Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonNode.asDouble()


  @Override
  Float parse() throws ParseException {
    final JsonNode value = node.path(BOOST_PROPERTY);
    if (value.isFloatingPointNumber()) {
      return (float) value.asDouble();
    }
    throw new ParseException("Invalid property '" + BOOST_PROPERTY + "': value is not a float");
  }

}
View Full Code Here


            } else if (valueNode.isInt()) {
                value = valueNode.asInt();
            } else if (valueNode.isLong()) {
                value = valueNode.asLong();
            } else if (valueNode.isDouble()) {
                value = valueNode.asDouble();
            } else {
                value = valueNode;
            }
            values[i] = value;
        }
View Full Code Here

                                    + "The field 'lang' MUST BE presnet and have a textual value! "
                                    + "(entry: "+entry+", received: "+root+")!");
                            }
                            field = entry.path("prob");
                            if(field.isNumber()){
                                prob = field.asDouble();
                            } else {
                                prob = -1;
                            }
                            detected.add(new LangSuggestion(lang, prob));
                           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.