@Beta public class MockJsonFactory extends JsonFactory
Constructor and Description |
---|
MockJsonFactory() |
Modifier and Type | Method and Description |
---|---|
JsonGenerator |
createJsonGenerator(OutputStream out,
Charset enc)
Returns a new instance of a low-level JSON serializer for the given output stream and encoding.
|
JsonGenerator |
createJsonGenerator(Writer writer)
Returns a new instance of a low-level JSON serializer for the given writer.
|
JsonParser |
createJsonParser(InputStream in)
Returns a new instance of a low-level JSON parser for the given input stream.
|
JsonParser |
createJsonParser(InputStream in,
Charset charset)
Returns a new instance of a low-level JSON parser for the given input stream.
|
JsonParser |
createJsonParser(Reader reader)
Returns a new instance of a low-level JSON parser for the given reader.
|
JsonParser |
createJsonParser(String value)
Returns a new instance of a low-level JSON parser for the given string value.
|
createJsonObjectParser, fromInputStream, fromInputStream, fromReader, fromString, toByteArray, toPrettyString, toString
public JsonParser createJsonParser(InputStream in) throws IOException
JsonFactory
createJsonParser
in class JsonFactory
in
- input streamIOException
public JsonParser createJsonParser(InputStream in, Charset charset) throws IOException
JsonFactory
createJsonParser
in class JsonFactory
in
- input streamcharset
- charset in which the input stream is encoded or null
to let the parser
detect the charsetIOException
public JsonParser createJsonParser(String value) throws IOException
JsonFactory
createJsonParser
in class JsonFactory
value
- string valueIOException
public JsonParser createJsonParser(Reader reader) throws IOException
JsonFactory
createJsonParser
in class JsonFactory
reader
- readerIOException
public JsonGenerator createJsonGenerator(OutputStream out, Charset enc) throws IOException
JsonFactory
createJsonGenerator
in class JsonFactory
out
- output streamenc
- encodingIOException
public JsonGenerator createJsonGenerator(Writer writer) throws IOException
JsonFactory
createJsonGenerator
in class JsonFactory
writer
- writerIOException
Copyright © 2011–2023 Google. All rights reserved.