Record Class JsonExtractSpec
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.JsonExtractSpec
- Record Components:
jsonPath- the JSONPath root expression; must not be blank
- All Implemented Interfaces:
ExtractSpec
Extracts tabular data from a JSON response body.
The jsonPath() expression locates the array of objects that
becomes the rows of the relation. Use "$." for a top-level object
(single-row result), "$.items[*]" for an array field, or
"$[*]" for a root-level array.
Syntax: extract: json("$.items[*]")
-
Constructor Summary
ConstructorsConstructorDescriptionJsonExtractSpec(String jsonPath) Creates an instance of aJsonExtractSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jsonPath()Returns the value of thejsonPathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JsonExtractSpec
Creates an instance of aJsonExtractSpecrecord class.- Parameters:
jsonPath- the value for thejsonPathrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
jsonPath
Returns the value of thejsonPathrecord component.- Returns:
- the value of the
jsonPathrecord component
-