public class JsonParser extends Object
| Constructor and Description |
|---|
JsonParser() |
| Modifier and Type | Method and Description |
|---|---|
static JsonNode |
parse(InputStream in)
Parses the contents in the given
InputStream and returns a JsonNode. |
static JsonNode |
parse(InputStream in,
String charsetName)
Parses the contents in the given
InputStream and returns a JsonNode. |
static JsonNode |
parse(Reader reader)
|
static JsonNode |
parse(String jsonStr)
Parses the contents in the given string and returns a
JsonNode. |
public static JsonNode parse(InputStream in) throws BallerinaException
InputStream and returns a JsonNode.in - input stream which contains the JSON contentJsonNode objectBallerinaException - for any parsing errorpublic static JsonNode parse(InputStream in, String charsetName) throws BallerinaException
InputStream and returns a JsonNode.in - input stream which contains the JSON contentcharsetName - the character set name of the input streamJsonNode objectBallerinaException - for any parsing errorpublic static JsonNode parse(String jsonStr) throws BallerinaException
JsonNode.jsonStr - the string which contains the JSON contentJsonNode objectBallerinaException - for any parsing errorpublic static JsonNode parse(Reader reader) throws BallerinaException
reader - reader which contains the JSON contentJsonNode objectBallerinaException - for any parsing errorCopyright © 2018 WSO2. All rights reserved.