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 class
JsValue.Type
-
Field Summary
Fields Modifier and Type Field Description JsValue.Type
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 Object
fromBytes(byte[] bytes, boolean jsonStrict, ResourceType resourceType)
static Object
fromJava(Object o)
static Object
fromString(String raw, boolean jsonStrict, ResourceType resourceType)
static Object
fromStringSafe(String raw)
List
getAsList()
Map<String,Object>
getAsMap()
String
getAsString()
org.graalvm.polyglot.Value
getOriginal()
<T> T
getValue()
JsValue
invoke(Object... args)
boolean
isArray()
boolean
isFunction()
boolean
isNull()
boolean
isObject()
boolean
isOther()
boolean
isTrue()
boolean
isXml()
static byte[]
toBytes(Object o)
static byte[]
toBytes(org.graalvm.polyglot.Value v)
static Object
toJava(org.graalvm.polyglot.Value v)
String
toJsonOrXmlString(boolean pretty)
String
toString()
static String
toString(Object o)
static String
toString(Object o, boolean pretty)
static Object
unWrap(Object o)
-
-
-
Field Detail
-
type
public final JsValue.Type type
-
-
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)
-
toBytes
public static byte[] toBytes(Object o)
-
fromBytes
public static Object fromBytes(byte[] bytes, boolean jsonStrict, ResourceType resourceType)
-
fromString
public static Object fromString(String raw, boolean jsonStrict, ResourceType resourceType)
-
-