3535import tools .jackson .core .JacksonException ;
3636import tools .jackson .core .JsonParser ;
3737import tools .jackson .core .JsonToken ;
38+ import tools .jackson .core .ObjectReadContext ;
3839import tools .jackson .core .StreamReadFeature ;
3940import tools .jackson .core .StreamWriteFeature ;
4041import tools .jackson .core .TokenStreamFactory ;
@@ -84,11 +85,11 @@ public void parse(final InputStream inputStream, final String baseUri)
8485 this .rdfHandler .startRDF ();
8586 }
8687
87- jp = configureNewJsonFactory ().createParser (inputStream );
88+ jp = configureNewJsonFactory ().createParser (ObjectReadContext . empty (), inputStream );
8889 rdfJsonToHandlerInternal (this .rdfHandler , this .valueFactory , jp );
8990 } catch (JacksonException e ) {
9091 if (jp != null ) {
91- reportFatalError ("Found IOException during parsing" , e , jp .currentLocation ());
92+ reportFatalError ("Found exception during parsing" , e , jp .currentLocation ());
9293 } else {
9394 reportFatalError (e );
9495 }
@@ -154,11 +155,11 @@ public void parse(final Reader reader, final String baseUri)
154155 this .rdfHandler .startRDF ();
155156 }
156157
157- jp = configureNewJsonFactory ().createParser (reader );
158+ jp = configureNewJsonFactory ().createParser (ObjectReadContext . empty (), reader );
158159 rdfJsonToHandlerInternal (rdfHandler , valueFactory , jp );
159160 } catch (JacksonException e ) {
160161 if (jp != null ) {
161- reportFatalError ("Found IOException during parsing" , e , jp .currentLocation ());
162+ reportFatalError ("Found exception during parsing" , e , jp .currentLocation ());
162163 } else {
163164 reportFatalError (e );
164165 }
@@ -229,7 +230,7 @@ private void rdfJsonToHandlerInternal(final RDFHandler handler, final ValueFacto
229230
230231 jp .nextToken ();
231232
232- nextValue = jp .getText ();
233+ nextValue = jp .getString ();
233234 } else if (RDFJSONUtility .TYPE .equals (fieldName )) {
234235 if (nextType != null ) {
235236 reportError (
@@ -240,7 +241,7 @@ private void rdfJsonToHandlerInternal(final RDFHandler handler, final ValueFacto
240241
241242 jp .nextToken ();
242243
243- nextType = jp .getText ();
244+ nextType = jp .getString ();
244245 } else if (RDFJSONUtility .LANG .equals (fieldName )) {
245246 if (nextLanguage != null ) {
246247 reportError (
@@ -252,7 +253,7 @@ private void rdfJsonToHandlerInternal(final RDFHandler handler, final ValueFacto
252253
253254 jp .nextToken ();
254255
255- nextLanguage = jp .getText ();
256+ nextLanguage = jp .getString ();
256257 } else if (RDFJSONUtility .DATATYPE .equals (fieldName )) {
257258 if (nextDatatype != null ) {
258259 reportError (
@@ -264,15 +265,15 @@ private void rdfJsonToHandlerInternal(final RDFHandler handler, final ValueFacto
264265
265266 jp .nextToken ();
266267
267- nextDatatype = jp .getText ();
268+ nextDatatype = jp .getString ();
268269 } else if (RDFJSONUtility .GRAPHS .equals (fieldName )) {
269270 if (jp .nextToken () != JsonToken .START_ARRAY ) {
270271 reportError ("Expected graphs to start with an array" , jp .currentLocation (),
271272 RDFJSONParserSettings .SUPPORT_GRAPHS_EXTENSION );
272273 }
273274
274275 while (jp .nextToken () != JsonToken .END_ARRAY ) {
275- final String nextGraph = jp .getText ();
276+ final String nextGraph = jp .getString ();
276277 nextContexts .add (nextGraph );
277278 }
278279 } else {
0 commit comments