Class DefaultJSONValueWriter
java.lang.Object
org.opendaylight.yangtools.yang.data.codec.gson.DefaultJSONValueWriter
- All Implemented Interfaces:
JSONValueWriter
A
JSONValueWriter
backed by a JsonWriter
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoString()
void
writeBoolean
(boolean value) Write aboolean
value, as per RFC7951, section 6.3.void
Write anempty
value, as per RFC7951, section 6.9.void
writeNumber
(Number value) Write a numeric value, as per RFC7951, section 6.1.void
writeString
(String value) Write a string value, as per RFC7951, section 6.2 and other types which have are represented as JSON strings.
-
Constructor Details
-
DefaultJSONValueWriter
public DefaultJSONValueWriter(com.google.gson.stream.JsonWriter writer)
-
-
Method Details
-
writeBoolean
Description copied from interface:JSONValueWriter
Write aboolean
value, as per RFC7951, section 6.3.- Specified by:
writeBoolean
in interfaceJSONValueWriter
- Parameters:
value
- Value to write- Throws:
IOException
- when an IO error occurs
-
writeEmpty
Description copied from interface:JSONValueWriter
Write anempty
value, as per RFC7951, section 6.9.- Specified by:
writeEmpty
in interfaceJSONValueWriter
- Throws:
IOException
- when an IO error occurs
-
writeNumber
Description copied from interface:JSONValueWriter
Write a numeric value, as per RFC7951, section 6.1.- Specified by:
writeNumber
in interfaceJSONValueWriter
- Parameters:
value
- Value to write- Throws:
IOException
- when an IO error occurs
-
writeString
Description copied from interface:JSONValueWriter
Write a string value, as per RFC7951, section 6.2 and other types which have are represented as JSON strings.- Specified by:
writeString
in interfaceJSONValueWriter
- Parameters:
value
- Value to write- Throws:
IOException
- when an IO error occurs
-
toString
-