Class ValueNodeMapper
java.lang.Object
com.northconcepts.datapipeline.jsonata.ValueNodeMapper
Converts values between DataPipeline
ValueNodes and the maps, lists and plain Java values used by the JSONata engine.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValueNode(Object value) static ObjecttoJsonataData(Object value) Converts a DataPipelineValueNodeto a form the JSONata engine understands (Map, List, or plain Java value) without deep-copying.static ValueNode<?> toValueNode(Object value) Converts a JSONata engine result back to a DataPipelineValueNode.
-
Method Details
-
isValueNode
-
toJsonataData
Converts a DataPipelineValueNodeto a form the JSONata engine understands (Map, List, or plain Java value) without deep-copying.Recordis wrapped in aJsonObject(implementsMap),ArrayValueis wrapped in anJsonArray(implementsList), andSingleValueis returned as its raw Java value. -
toValueNode
Converts a JSONata engine result back to a DataPipelineValueNode.If the result is already backed by a
JsonObjectorJsonArray, the original DataPipeline object is unwrapped directly — no copy required. PlainMapandListinstances produced by the engine are converted toRecordandArrayValuerespectively.
-