public class JsonHelper extends Object
Constructor and Description |
---|
JsonHelper() |
Modifier and Type | Method and Description |
---|---|
static org.codehaus.jackson.JsonParser |
createJsonParser(Reader input)
Create a JsonParser with default feature values
|
static org.codehaus.jackson.JsonParser |
createJsonParser(Reader input,
boolean... arguments)
Create a JsonParser with custom feature values
Order of JsonParser arguments:
Feature.ALLOW_COMMENTS
Feature.ALLOW_UNQUOTED_FIELD_NAMES
Feature.ALLOW_SINGLE_QUOTES
Feature.ALLOW_UNQUOTED_CONTROL_CHARS
Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER
Feature.ALLOW_NUMERIC_LEADING_ZEROS
Feature.ALLOW_NON_NUMERIC_NUMBERS
|
static org.codehaus.jackson.JsonParser |
createLenientJsonParser(Reader input)
Create a JsonParser with all features enabled.
|
static org.codehaus.jackson.map.ObjectMapper |
createObjectMapper(boolean... arguments)
Order of ObjectMapper arguments:
Feature.ALLOW_COMMENTS
Feature.ALLOW_UNQUOTED_FIELD_NAMES
Feature.ALLOW_SINGLE_QUOTES
Feature.ALLOW_UNQUOTED_CONTROL_CHARS
Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER
Feature.ALLOW_NUMERIC_LEADING_ZEROS
Feature.ALLOW_NON_NUMERIC_NUMBERS
|
public static org.codehaus.jackson.map.ObjectMapper createObjectMapper(boolean... arguments)
arguments
- list of ObjectMapper featurespublic static org.codehaus.jackson.JsonParser createJsonParser(Reader input) throws IOException
input
- Reader to use for reading JSON content to parseIOException
public static org.codehaus.jackson.JsonParser createJsonParser(Reader input, boolean... arguments) throws IOException
input
- Reader to use for reading JSON content to parsearguments
- a boolean array with exactly 7 elementsIOException
public static org.codehaus.jackson.JsonParser createLenientJsonParser(Reader input) throws IOException
input
- Reader to use for reading JSON content to parseIOException
Copyright © 2020 Actian Corporation. All rights reserved.