congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FieldsDeserializer.resolveType
Code IndexAdd Tabnine to your IDE (free)

How to use
resolveType
method
in
cascading.bind.json.FieldsDeserializer

Best Java code snippets using cascading.bind.json.FieldsDeserializer.resolveType (Showing top 1 results out of 315)

origin: cascading/cascading-bind

@Override
public Fields deserialize( JsonParser jsonParser, DeserializationContext ctxt ) throws IOException, JsonProcessingException
 {
 ObjectMapper mapper = (ObjectMapper) jsonParser.getCodec();
 ObjectNode root = mapper.readTree( jsonParser );
 Fields fields = Fields.NONE;
 if( root.has( "kind" ) )
  return resolveKind( root.get( "kind" ) );
 JsonNode fieldsNodes = root.get( "names" );
 JsonNode typesNodes = root.get( "types" );
 for( int i = 0; i < fieldsNodes.size(); i++ )
  {
  JsonNode nameNode = fieldsNodes.get( i );
  JsonNode typeNode = typesNodes == null ? null : typesNodes.get( i );
  Comparable name = nameNode.isNumber() ? nameNode.asInt() : nameNode.asText();
  Type type = typeNode != null ? resolveType( typeNode ) : null;
  Fields current;
  if( typeNode != null )
   current = new Fields( name, type );
  else
   current = new Fields( name );
  fields = fields.append( current );
  }
 return fields;
 }
cascading.bind.jsonFieldsDeserializerresolveType

Popular methods of FieldsDeserializer

  • <init>
  • resolveKind

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now