Package com.intuit.karate.graal
Class JsValue
- java.lang.Object
-
- com.intuit.karate.graal.JsValue
-
public class JsValue extends Object
- Author:
- pthomas3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsValue.Type
-
Constructor Summary
Constructors Constructor Description JsValue(org.graalvm.polyglot.Value v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectfromJava(Object o)ListgetAsList()Map<String,Object>getAsMap()StringgetAsString()org.graalvm.polyglot.ValuegetOriginal()<T> TgetValue()booleanisArray()booleanisFunction()booleanisNull()booleanisObject()booleanisOther()booleanisTrue()static booleanisTruthy(Object o)booleanisXml()static byte[]toBytes(org.graalvm.polyglot.Value v)static ObjecttoJava(org.graalvm.polyglot.Value v)StringtoJsonOrXmlString(boolean pretty)StringtoString()static ObjectunWrap(Object o)
-
-
-
Field Detail
-
NULL
public static final JsValue NULL
-
type
public final JsValue.Type type
-
LOCK
public static final Object LOCK
-
-
Method Detail
-
getValue
public <T> T getValue()
-
getAsList
public List getAsList()
-
getOriginal
public org.graalvm.polyglot.Value getOriginal()
-
isXml
public boolean isXml()
-
isNull
public boolean isNull()
-
isObject
public boolean isObject()
-
isArray
public boolean isArray()
-
isTrue
public boolean isTrue()
-
isFunction
public boolean isFunction()
-
isOther
public boolean isOther()
-
toJsonOrXmlString
public String toJsonOrXmlString(boolean pretty)
-
getAsString
public String getAsString()
-
toJava
public static Object toJava(org.graalvm.polyglot.Value v)
-
toBytes
public static byte[] toBytes(org.graalvm.polyglot.Value v)
-
isTruthy
public static boolean isTruthy(Object o)
-
-