/** * Overridable factory method that actually instantiates parser * using given <code>char[]</code> object for accessing content. * * @since 2.4 */ protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
/** * Overridable factory method that actually instantiates parser * using given {@link Reader} object for reading content. *<p> * This method is specifically designed to remain * compatible between minor versions so that sub-classes can count * on it being called as expected. That is, it is part of official * interface from sub-class perspective, although not a public * method available to users of factory implementations. * * @since 2.1 */ protected JsonParser _createParser(Reader r, IOContext ctxt) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, Reader r) throws IOException { return new ReaderBasedJsonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), r, _rootCharSymbols.makeChild(_factoryFeatures)); }
@Override protected JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, char[] data, int offset, int len, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(readCtxt, ioCtxt, readCtxt.getStreamReadFeatures(_streamReadFeatures), readCtxt.getFormatReadFeatures(_formatReadFeatures), null, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
public JsonParser constructParser(int parserFeatures, ObjectCodec codec, ByteQuadsCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols, int factoryFeatures) throws IOException { JsonEncoding enc = detectEncoding(); if (enc == JsonEncoding.UTF8) { /* and without canonicalization, byte-based approach is not performant; just use std UTF-8 reader * (which is ok for larger input; not so hot for smaller; but this is not a common case) */ if (JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(factoryFeatures)) { ByteQuadsCanonicalizer can = rootByteSymbols.makeChild(factoryFeatures); return new UTF8StreamJsonParser(_context, parserFeatures, _in, codec, can, _inputBuffer, _inputPtr, _inputEnd, _bufferRecyclable); } } return new ReaderBasedJsonParser(_context, parserFeatures, constructReader(), codec, rootCharSymbols.makeChild(factoryFeatures)); }
public JsonParser constructParser(ObjectReadContext readCtxt, int streamReadFeatures, int formatReadFeatures, ByteQuadsCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols, int factoryFeatures) throws IOException { JsonEncoding enc = detectEncoding(); if (enc == JsonEncoding.UTF8) { /* and without canonicalization, byte-based approach is not performant; just use std UTF-8 reader * (which is ok for larger input; not so hot for smaller; but this is not a common case) */ if (JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(factoryFeatures)) { ByteQuadsCanonicalizer can = rootByteSymbols.makeChild(factoryFeatures); return new UTF8StreamJsonParser(readCtxt, _context, streamReadFeatures, formatReadFeatures, _in, can, _inputBuffer, _inputPtr, _inputEnd, _bufferRecyclable); } } return new ReaderBasedJsonParser(readCtxt, _context, streamReadFeatures, formatReadFeatures, constructReader(), rootCharSymbols.makeChild(factoryFeatures)); }
/** * Overridable factory method that actually instantiates parser * using given <code>char[]</code> object for accessing content. * * @since 2.4 */ protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
/** * Overridable factory method that actually instantiates parser * using given <code>char[]</code> object for accessing content. * * @since 2.4 */ protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
/** * Overridable factory method that actually instantiates parser * using given <code>char[]</code> object for accessing content. * * @since 2.4 */ protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
/** * Overridable factory method that actually instantiates parser * using given <code>char[]</code> object for accessing content. * * @since 2.4 */ protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures), data, offset, offset+len, recyclable); }
/** * Overridable factory method that actually instantiates parser * using given {@link Reader} object for reading content. *<p> * This method is specifically designed to remain * compatible between minor versions so that sub-classes can count * on it being called as expected. That is, it is part of official * interface from sub-class perspective, although not a public * method available to users of factory implementations. * * @since 2.1 */ protected JsonParser _createParser(Reader r, IOContext ctxt) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
/** * Overridable factory method that actually instantiates parser * using given {@link Reader} object for reading content. *<p> * This method is specifically designed to remain * compatible between minor versions so that sub-classes can count * on it being called as expected. That is, it is part of official * interface from sub-class perspective, although not a public * method available to users of factory implementations. * * @since 2.1 */ protected JsonParser _createParser(Reader r, IOContext ctxt) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
/** * Overridable factory method that actually instantiates parser * using given {@link Reader} object for reading content. *<p> * This method is specifically designed to remain * compatible between minor versions so that sub-classes can count * on it being called as expected. That is, it is part of official * interface from sub-class perspective, although not a public * method available to users of factory implementations. * * @since 2.1 */ protected JsonParser _createParser(Reader r, IOContext ctxt) throws IOException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
/** * Create a parser that can be used for parsing JSON objects contained * within a SCIM filter specification. * @param r Reader to use for reading JSON content to parse * @return ScimFilterJsonParser object * @throws IOException on parse error */ JsonParser createScimFilterParser(final Reader r) throws IOException { IOContext ctxt = _createContext(r, false); return new ScimFilterJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
/** * Create a parser that can be used for parsing JSON objects contained * within a SCIM filter specification. * @param r Reader to use for reading JSON content to parse * @return ScimFilterJsonParser object * @throws IOException on parse error */ JsonParser createScimFilterParser(final Reader r) throws IOException { IOContext ctxt = _createContext(r, false); return new ScimFilterJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(_factoryFeatures)); }
/** * @deprecated since 2.1 -- use {@link #_createParser(Reader, IOContext)} instead */ @Deprecated protected JsonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES), isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES))); }
/** * Overridable factory method that actually instantiates parser * using given {@link Reader} object for reading content. *<p> * This method is specifically designed to remain * compatible between minor versions so that sub-classes can count * on it being called as expected. That is, it is part of official * interface from sub-class perspective, although not a public * method available to users of factory implementations. */ protected JsonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException { return new ReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, _rootCharSymbols.makeChild(isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES), isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES))); }
@Deprecated protected RisonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException { return new RisonParser(ctxt, _parserFeatures, _risonParserFeatures, r, _objectCodec, _rootCharSymbols.makeChild( (isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) ? JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask() : 0) | (isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES) ? JsonFactory.Feature.INTERN_FIELD_NAMES.getMask() : 0))); }
@Override protected RisonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException { return new RisonParser(ctxt, _parserFeatures, _risonParserFeatures, r, _objectCodec, _rootCharSymbols.makeChild( (isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) ? JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask() : 0) | (isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES) ? JsonFactory.Feature.INTERN_FIELD_NAMES.getMask() : 0))); } }.enable(RisonGenerator.Feature.O_RISON)
@Override protected RisonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException { return new RisonParser(ctxt, _parserFeatures, _risonParserFeatures, r, _objectCodec, _rootCharSymbols.makeChild( (isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) ? JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask() : 0) | (isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES) ? JsonFactory.Feature.INTERN_FIELD_NAMES.getMask() : 0))); } }.enable(RisonGenerator.Feature.O_RISON)