/** * @deprecated Use {@link #configure(JsonParser.Feature, boolean)} instead */ @SuppressWarnings("dep-ann") public final void setParserFeature(JsonParser.Feature f, boolean state) { configure(f, state); }
/** * Method for changing state of an on/off {@link JsonParser} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setParserFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonParser.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * Method for changing state of an on/off {@link JsonGenerator} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setGeneratorFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonGenerator.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * @deprecated Use {@link #configure(JsonGenerator.Feature, boolean)} instead */ @Deprecated public final void setGeneratorFeature(JsonGenerator.Feature f, boolean state) { configure(f, state); }
/** * @deprecated Use {@link #configure(JsonParser.Feature, boolean)} instead */ @SuppressWarnings("dep-ann") public final void setParserFeature(JsonParser.Feature f, boolean state) { configure(f, state); }
/** * Method for changing state of an on/off {@link JsonParser} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setParserFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonParser.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * Method for changing state of an on/off {@link JsonGenerator} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setGeneratorFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonGenerator.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * @deprecated Use {@link #configure(JsonGenerator.Feature, boolean)} instead */ @Deprecated public final void setGeneratorFeature(JsonGenerator.Feature f, boolean state) { configure(f, state); }
/** * @deprecated Use {@link #configure(JsonParser.Feature, boolean)} instead */ @SuppressWarnings("dep-ann") public final void setParserFeature(JsonParser.Feature f, boolean state) { configure(f, state); }
/** * @deprecated Use {@link #configure(JsonParser.Feature, boolean)} instead */ @SuppressWarnings("dep-ann") public final void setParserFeature(JsonParser.Feature f, boolean state) { configure(f, state); }
/** * Method for changing state of an on/off {@link JsonGenerator} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setGeneratorFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonGenerator.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * Method for changing state of an on/off {@link JsonGenerator} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setGeneratorFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonGenerator.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * Method for changing state of an on/off {@link JsonParser} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setParserFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonParser.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
/** * Method for changing state of an on/off {@link JsonGenerator} feature for * {@link JsonFactory} instance this object mapper uses. *<p> * This is method is basically a shortcut method for calling * {@link JsonFactory#setGeneratorFeature} on the shared * {@link JsonFactory} this mapper uses (which is accessible * using {@link #getJsonFactory}). * * @since 1.2 */ public ObjectMapper configure(JsonGenerator.Feature f, boolean state) { _jsonFactory.configure(f, state); return this; }
private static JsonFactory getFactory() { if (factory == null) { factory = new JsonFactory(); factory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); factory.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); factory.configure(JsonParser.Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); factory.configure(JsonParser.Feature.ALLOW_NUMERIC_LEADING_ZEROS, true); } return factory; }
private static JsonFactory getFactory() { if (factory == null) { factory = new JsonFactory(); factory.configure(JsonParser.Feature.ALLOW_COMMENTS, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); factory.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); factory.configure(JsonParser.Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); factory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); factory.configure(JsonParser.Feature.ALLOW_NUMERIC_LEADING_ZEROS, true); } return factory; }
/** * @deprecated Use {@link #configure(JsonGenerator.Feature, boolean)} instead */ @Deprecated public final void setGeneratorFeature(JsonGenerator.Feature f, boolean state) { configure(f, state); }
/** * @deprecated Use {@link #configure(JsonGenerator.Feature, boolean)} instead */ @Deprecated public final void setGeneratorFeature(JsonGenerator.Feature f, boolean state) { configure(f, state); }
public TReadableJSONProtocol(TTransport trans, PrettyPrinter pp, JsonParser jp, boolean coerceMapKeys) { super(trans); prettyPrinter = pp; jsonFactory = new JsonFactory(); jsonFactory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); jsonFactory.setCharacterEscapes(new JsonCharacterEscapes()); if (jp != null) { this.jp = jp; } this.coerceMapKeys = coerceMapKeys; }
public TReadableJSONProtocol(TTransport trans, PrettyPrinter pp, JsonParser jp, boolean coerceMapKeys, boolean bareObjectIds, boolean numbersAsStrings) { super(trans); prettyPrinter = pp; jsonFactory = new JsonFactory(); jsonFactory.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true); jsonFactory.setCharacterEscapes(new JsonCharacterEscapes()); if (jp != null) { this.jp = jp; } this.coerceMapKeys = coerceMapKeys; this.bareObjectIds = bareObjectIds; this.numbersAsStrings = numbersAsStrings; }