Package io.nats.jparse.parser.functable
Class JsonParserFunctions
- java.lang.Object
-
- io.nats.jparse.parser.functable.JsonParserFunctions
-
public class JsonParserFunctions extends java.lang.Object
A collection of functions used by the `JsonFuncParser` to parse JSON.
-
-
Field Summary
Fields Modifier and Type Field Description static ParseFunction
defaultFunc
Default Function.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
parseFalse(CharSource source, TokenList tokens)
Parses the "false" token from the given character source and adds the resulting token to the given token list.static boolean
parseKeyNoEncode(CharSource source, TokenList tokens)
Parses an unencoded key from the given character source and adds the resulting token to the given token list.static boolean
parseKeyNoQuote(CharSource source, TokenList tokens)
Parses an unquoted key from the given character source and adds the resulting token to the given token list.static boolean
parseKeyWithEncode(CharSource source, TokenList tokens)
Parses an encoded key from the given character source and adds the resulting token to the given token list.static void
parseNull(CharSource source, TokenList tokens)
Parses the "null" token from the given character source and adds the resulting token to the given token list.static void
parseNumber(CharSource source, TokenList tokens)
Parses a number from the given character source and adds the resulting token to the given token list.static void
parseString(CharSource source, TokenList tokens)
Parses a string given character source and adds the resulting token to the given token list.static void
parseTrue(CharSource source, TokenList tokens)
Parses the "true" token from the given character source and adds the resulting token to the given token list.
-
-
-
Field Detail
-
defaultFunc
public static ParseFunction defaultFunc
Default Function.
-
-
Method Detail
-
parseFalse
public static void parseFalse(CharSource source, TokenList tokens)
Parses the "false" token from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token
-
parseTrue
public static void parseTrue(CharSource source, TokenList tokens)
Parses the "true" token from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token
-
parseNull
public static void parseNull(CharSource source, TokenList tokens)
Parses the "null" token from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token
-
parseNumber
public static void parseNumber(CharSource source, TokenList tokens)
Parses a number from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token
-
parseKeyNoQuote
public static boolean parseKeyNoQuote(CharSource source, TokenList tokens)
Parses an unquoted key from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token- Returns:
- `true` if the parse was successful, `false` otherwise
-
parseKeyWithEncode
public static boolean parseKeyWithEncode(CharSource source, TokenList tokens)
Parses an encoded key from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token- Returns:
- `true` if the parse was successful, `false` otherwise
-
parseKeyNoEncode
public static boolean parseKeyNoEncode(CharSource source, TokenList tokens)
Parses an unencoded key from the given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token- Returns:
- `true` if the parse was successful, `false` otherwise
-
parseString
public static void parseString(CharSource source, TokenList tokens)
Parses a string given character source and adds the resulting token to the given token list.- Parameters:
source
- the `CharSource` to parsetokens
- the `TokenList` to which to add the resulting token
-
-