vert.x - io.vertx.core.json.JsonObject: How to get the type of the value for given key? -


i'm using following package jsonobject: http://vertx.io/docs/apidocs/io/vertx/core/json/jsonobject.html

if jsonobject key 'fieldname' , want value, have use functions such 'getstring', 'getinteger', 'getarray' etc. mean have know in advanced type of value. happens if don't know it? there generic function of retrieving value jsonobject without knowing type?

use getvalue(string).

it returns object can test type , cast accordingly.


notes comments: checking code on github, looks getfield(string) method present in 2.x branch. looks getvalue(string) delegated getfield(string) method (see code). of august 2017, there's no getfield(string) in master (see code).


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -