Package com.benesult.vivjson
Class Viv.Json
java.lang.Object
com.benesult.vivjson.Viv.Json
- Enclosing class:
Viv
JSON data class.
In default, both of script's code and JSON value are accepted.
This class is used if you want to accept as JSON value rather
than script's code.
String value = "{\"a\": 3}";
String code = "return(a)";
Viv.Result result = Viv.run(new Viv.Json(value), code);
System.out.println(result.value); // 3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
JSON value.
-
-
Constructor Details
-
Json
Constructs JSON data class instance.- Parameters:
value
- JSON value.
-