public static JsonEndpointConfig forReading(ObjectReader reader, Annotation[] annotations) { return new JsonEndpointConfig(reader.getConfig()) .add(annotations, false) .initReader(reader); }
@Override public Object modifyBeforeWrite(Object value) { return applyJSONP(value); }
@Override protected JsonEndpointConfig _configForReading(ObjectReader reader, Annotation[] annotations) { return JsonEndpointConfig.forReading(reader, annotations); }
public static JsonEndpointConfig forWriting(ObjectWriter writer, Annotation[] annotations, String defaultJsonpMethod) { JsonEndpointConfig config = new JsonEndpointConfig(writer.getConfig()); if (defaultJsonpMethod != null) { config._jsonp = new JSONP.Def(defaultJsonpMethod); } return config .add(annotations, true) .initWriter(writer) ; }
@Override protected JsonEndpointConfig _configForWriting(ObjectWriter writer, Annotation[] annotations) { return JsonEndpointConfig.forWriting(writer, annotations, _jsonpFunctionName); }
@SuppressWarnings("deprecation") @Override protected void addAnnotation(Class<? extends Annotation> type, Annotation annotation, boolean forWriting) { if (type == JSONP.class) { if (forWriting) { _jsonp = new JSONP.Def((JSONP) annotation); } } else if (type == com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures.class) { com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures feats = (com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures) annotation; if (forWriting) { _serEnable = nullIfEmpty(feats.serializationEnable()); _serDisable = nullIfEmpty(feats.serializationDisable()); } else { _deserEnable = nullIfEmpty(feats.deserializationEnable()); _deserDisable = nullIfEmpty(feats.deserializationDisable()); } } else { super.addAnnotation(type, annotation, forWriting); } }
ObjectWriter writer = endpoint.getWriter(); boolean withIndentOutput = false; // no way to replace _serializationConfig writer = writer.withType(rootType); value = endpoint.modifyBeforeWrite(value); ObjectWriterModifier mod = ObjectWriterInjector.getAndClear(); if (mod == null) {
_readers.put(key, endpoint); final ObjectReader reader = endpoint.getReader(); final JsonParser jp = _createParser(reader, entityStream);
public static JsonEndpointConfig forWriting(ObjectWriter writer, Annotation[] annotations, String defaultJsonpMethod) { JsonEndpointConfig config = new JsonEndpointConfig(); if (defaultJsonpMethod != null) { config._jsonp = new JSONP.Def(defaultJsonpMethod); } return config .add(annotations, true) .initWriter(writer) ; }
@Override protected JsonEndpointConfig _configForWriting(ObjectWriter writer, Annotation[] annotations) { return JsonEndpointConfig.forWriting(writer, annotations, _jsonpFunctionName); }
@SuppressWarnings("deprecation") @Override protected void addAnnotation(Class<? extends Annotation> type, Annotation annotation, boolean forWriting) { if (type == JSONP.class) { if (forWriting) { _jsonp = new JSONP.Def((JSONP) annotation); } } else if (type == com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures.class) { com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures feats = (com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures) annotation; if (forWriting) { _serEnable = nullIfEmpty(feats.serializationEnable()); _serDisable = nullIfEmpty(feats.serializationDisable()); } else { _deserEnable = nullIfEmpty(feats.deserializationEnable()); _deserDisable = nullIfEmpty(feats.deserializationDisable()); } } else { super.addAnnotation(type, annotation, forWriting); } }
ObjectWriter writer = endpoint.getWriter(); boolean withIndentOutput = false; // no way to replace _serializationConfig writer = writer.withType(rootType); value = endpoint.modifyBeforeWrite(value); ObjectWriterModifier mod = ObjectWriterInjector.getAndClear(); if (mod == null) {
_readers.put(key, endpoint); final ObjectReader reader = endpoint.getReader(); final JsonParser jp = _createParser(reader, entityStream);
public static JsonEndpointConfig forReading(ObjectReader reader, Annotation[] annotations) { return new JsonEndpointConfig() .add(annotations, false) .initReader(reader); }
public static JsonEndpointConfig forWriting(ObjectWriter writer, Annotation[] annotations, String defaultJsonpMethod) { JsonEndpointConfig config = new JsonEndpointConfig(); if (defaultJsonpMethod != null) { config._jsonp = new JSONP.Def(defaultJsonpMethod); } return config .add(annotations, true) .initWriter(writer) ; }
@Override protected JsonEndpointConfig _configForWriting(ObjectWriter writer, Annotation[] annotations) { return JsonEndpointConfig.forWriting(writer, annotations, _jsonpFunctionName); }
@Override protected JsonEndpointConfig _configForReading(ObjectReader reader, Annotation[] annotations) { return JsonEndpointConfig.forReading(reader, annotations); }
@Override public Object modifyBeforeWrite(Object value) { return applyJSONP(value); }
@SuppressWarnings("deprecation") @Override protected void addAnnotation(Class<? extends Annotation> type, Annotation annotation, boolean forWriting) { if (type == JSONP.class) { if (forWriting) { _jsonp = new JSONP.Def((JSONP) annotation); } } else if (type == com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures.class) { com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures feats = (com.fasterxml.jackson.jaxrs.json.annotation.JacksonFeatures) annotation; if (forWriting) { _serEnable = nullIfEmpty(feats.serializationEnable()); _serDisable = nullIfEmpty(feats.serializationDisable()); } else { _deserEnable = nullIfEmpty(feats.deserializationEnable()); _deserDisable = nullIfEmpty(feats.deserializationDisable()); } } else { super.addAnnotation(type, annotation, forWriting); } }
public static JsonEndpointConfig forReading(ObjectReader reader, Annotation[] annotations) { return new JsonEndpointConfig() .add(annotations, false) .initReader(reader); }