com.fasterxml.jackson.databind.deser.ResolvableDeserializer Java Examples

The following examples show how to use com.fasterxml.jackson.databind.deser.ResolvableDeserializer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConfiguredBean.java    From logsniffer with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void resolve(final DeserializationContext ctxt)
		throws JsonMappingException {
	if (defaultDeserializer instanceof ResolvableDeserializer) {
		((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
	}
}
 
Example #2
Source File: StdDelegatingDeserializer.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt)
    throws JsonMappingException
{
    if (_delegateDeserializer != null && _delegateDeserializer instanceof ResolvableDeserializer) {
        ((ResolvableDeserializer) _delegateDeserializer).resolve(ctxt);
    }
}
 
Example #3
Source File: HiveProxyingSubScanDeserializer.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
@Override
public HiveProxyingSubScan deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
  final JsonNode node = jsonParser.getCodec().readTree(jsonParser);

  final String pluginName = node.get("pluginName").asText();
  final CatalogService catalogService = (CatalogService) deserializationContext
    .findInjectableValue(CatalogService.class.getName(), null, null);

  final StoragePluginCreator.PF4JStoragePlugin plugin = catalogService.getSource(pluginName);
  final Class<? extends HiveProxiedSubScan> scanClazz = plugin.getSubScanClass();

  final JavaType scanType = deserializationContext.getTypeFactory().constructType(scanClazz);
  final BasicBeanDescription description = deserializationContext.getConfig().introspect(scanType);
  final JsonDeserializer<Object> subScanDeserializer = deserializationContext.getFactory().createBeanDeserializer(
    deserializationContext, scanType, description);

  if (subScanDeserializer instanceof ResolvableDeserializer) {
    ((ResolvableDeserializer) subScanDeserializer).resolve(deserializationContext);
  }

  final JsonParser movedParser = jsonParser.getCodec().treeAsTokens(node.get("wrappedHiveScan"));
  deserializationContext.getConfig().initialize(movedParser);

  if (movedParser.getCurrentToken() == null) {
    movedParser.nextToken();
  }

  final HiveProxiedSubScan scan = (HiveProxiedSubScan) subScanDeserializer.deserialize(movedParser, deserializationContext);
  return new HiveProxyingSubScan(pluginName, scan);
}
 
Example #4
Source File: HiveProxyingOrcScanFilterDeserializer.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
@Override
public HiveProxyingOrcScanFilter deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
  // TODO: Optimize performance as described in https://dremio.atlassian.net/browse/DX-17732
  final JsonNode node = jsonParser.getCodec().readTree(jsonParser);

  final String pluginName = node.get(HiveProxyingOrcScanFilter.JSON_PROP_PLUGINNAME).asText();
  final CatalogService catalogService = (CatalogService) deserializationContext
    .findInjectableValue(CatalogService.class.getName(), null, null);

  final StoragePluginCreator.PF4JStoragePlugin plugin = catalogService.getSource(pluginName);
  final Class<? extends HiveProxiedOrcScanFilter> scanClazz = plugin.getOrcScanFilterClass();

  final JavaType scanType = deserializationContext.getTypeFactory().constructType(scanClazz);
  final BasicBeanDescription description = deserializationContext.getConfig().introspect(scanType);
  final JsonDeserializer<Object> orcScanFilterDeserializer = deserializationContext.getFactory().createBeanDeserializer(
    deserializationContext, scanType, description);

  if (orcScanFilterDeserializer instanceof ResolvableDeserializer) {
    ((ResolvableDeserializer) orcScanFilterDeserializer).resolve(deserializationContext);
  }

  final JsonParser movedParser = jsonParser.getCodec().treeAsTokens(node.get(HiveProxyingOrcScanFilter.JSON_PROP_WRAPPEDHIVEORCSCANFILTER));
  deserializationContext.getConfig().initialize(movedParser);

  if (movedParser.getCurrentToken() == null) {
    movedParser.nextToken();
  }

  final HiveProxiedOrcScanFilter orcScanFilter = (HiveProxiedOrcScanFilter) orcScanFilterDeserializer.deserialize(movedParser, deserializationContext);
  return new HiveProxyingOrcScanFilter(pluginName, orcScanFilter);
}
 
Example #5
Source File: RawResponseDeserializer.java    From web3j with Apache License 2.0 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #6
Source File: FieldModule.java    From testrail-api-java-client with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext deserializationContext) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(deserializationContext);
}
 
Example #7
Source File: ResultModule.java    From testrail-api-java-client with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext deserializationContext) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(deserializationContext);
}
 
Example #8
Source File: CaseModule.java    From testrail-api-java-client with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext deserializationContext) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(deserializationContext);
}
 
Example #9
Source File: PlanModule.java    From testrail-api-java-client with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext deserializationContext) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(deserializationContext);
}
 
Example #10
Source File: MetricDeserializer.java    From Sparkplug with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
	((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #11
Source File: AdditionalPropertiesDeserializer.java    From autorest-clientruntime-for-java with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #12
Source File: FlatteningDeserializer.java    From autorest-clientruntime-for-java with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext cxt) throws JsonMappingException {
    ((ResolvableDeserializer) this.defaultDeserializer).resolve(cxt);
}
 
Example #13
Source File: RawResponseDeserializer.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #14
Source File: RawResponseDeserializer.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #15
Source File: AdditionalPropertiesDeserializer.java    From botbuilder-java with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}
 
Example #16
Source File: FlatteningDeserializer.java    From botbuilder-java with MIT License 4 votes vote down vote up
@Override
public void resolve(DeserializationContext cxt) throws JsonMappingException {
    ((ResolvableDeserializer) this.defaultDeserializer).resolve(cxt);
}
 
Example #17
Source File: RawResponseDeserializer.java    From etherscan-explorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void resolve(DeserializationContext ctxt) throws JsonMappingException {
    ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);
}