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