### startObject() - SimpleJsonWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - SimpleJsonWriter ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### EnsurePutIfAbsentByPath Example Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/EnsurePutIfAbsentByPath.html This example demonstrates how to use the @EnsurePutIfAbsentByPath annotation to create a method that writes a default theme if it's absent. The method takes a root user object and a value, and returns the existing or newly set theme. ```java @CompiledPath interface Users { @EnsurePutIfAbsentByPath("$.settings.theme") String defaultTheme(User root, String value); } ``` -------------------------------- ### startObject() - Jackson3Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - Jackson3Writer ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - Jackson3Reader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - Jackson3Reader ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - SimpleJsonWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - SimpleJsonWriter ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - GsonWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - GsonWriter ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - Fastjson2Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - Fastjson2Writer ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - SnakeReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - SnakeReader ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - Jackson2Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - Jackson2Writer ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startDocument() - SnakeWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts YAML stream and document. ```APIDOC ## startDocument() - SnakeWriter ### Description Starts YAML stream and document. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - JsonpWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - JsonpWriter ### Description Starts object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startDocument() - StreamingReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts document scope. ```APIDOC ## startDocument() - StreamingReader ### Description Starts document scope. ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - StreamingReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope. ```APIDOC ## startObject() - StreamingReader ### Description Starts object scope. ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### Example Interface with CompiledPath Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/CompiledPath.html This snippet shows an example of an interface annotated with @CompiledPath. Abstract methods are annotated with path operations like @GetByPath and @PutByPath to define JSON path interactions. ```java @CompiledPath interface UserPaths { @GetByPath("$.profile.name") String name(User user); @PutByPath("$.tags[{idx}]") String tag(User user, int idx, String value); } ``` -------------------------------- ### Using JSON Pointer for Source Property Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/mapper/Mapping.html Alternatively, JSON Pointer syntax starting with '/' can be used to specify the source property path. This example is equivalent to the previous one using '$'. ```java "customer:/profile/name" ``` -------------------------------- ### startArray() - GsonWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - GsonWriter ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - SnakeReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - SnakeReader ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - Jackson3Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - Jackson3Writer ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - Jackson3Reader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - Jackson3Reader ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - Fastjson2Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - Fastjson2Writer ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - JsonpWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - JsonpWriter ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - StreamingReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - StreamingReader ### Description Starts array scope. ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startDocument() - StreamingWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Marks the start of a JSON document. ```APIDOC ## startDocument() - StreamingWriter ### Description Marks the start of a JSON document. ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Writes to output stream) ``` -------------------------------- ### startObject() - SnakeWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope as mapping event. ```APIDOC ## startObject() - SnakeWriter ### Description Starts object scope as mapping event. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### Sjf4j Runtime Instance Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/Sjf4j.html Provides methods to get the global instance, create a builder, and access various facades for data conversion. ```APIDOC ## Sjf4j Runtime ### Description Provides access to the Sjf4j runtime, including global instance retrieval, builder creation, and various conversion facades. ### Methods * **`global()`** - Returns the shared process-wide default instance of Sjf4j. * **`builder()`** - Creates a new Sjf4j builder with default settings. * **`builder(Sjf4j sjf4j)`** - Creates a new Sjf4j builder initialized from an existing Sjf4j instance. * **`streamingContext()`** - Returns the immutable streaming configuration used by this runtime. * **`nodeFacade()`** - Returns the node-conversion facade used by this runtime. * **`jsonFacade()`** - Returns the JSON facade used by this runtime. * **`yamlFacade()`** - Returns the YAML facade used by this runtime. * **`propertiesFacade()`** - Returns the properties facade used by this runtime. ``` -------------------------------- ### startArray() - Jackson2Writer Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts array scope. ```APIDOC ## startArray() - Jackson2Writer ### Description Starts array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - SnakeWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Starts object scope as sequence event. ```APIDOC ## startArray() - SnakeWriter ### Description Starts object scope as sequence event. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startDocument() - SnakeReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes stream/document start events. ```APIDOC ## startDocument() - SnakeReader ### Description Consumes stream/document start events. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### EnsurePutIfAbsentByPath Annotation Usage Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/EnsurePutIfAbsentByPath.html This example demonstrates how to use the @EnsurePutIfAbsentByPath annotation to create a method that writes a default theme to a user's settings if it doesn't exist. ```APIDOC ## @EnsurePutIfAbsentByPath ### Description Generates a direct single-path write-if-absent method that creates missing intermediate containers before checking the final value. The final value is written only when the current target is absent or `null`; an existing non-null value is returned unchanged. Append targets always append and return `null`. Because absent writes return `null`, primitive method return types are not supported. Intermediate creation rules are the same as `EnsurePutByPath`. The root parameter is required; only children below the root are created. ### Method Signature `String defaultTheme(User root, String value)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java @CompiledPath interface Users { @EnsurePutIfAbsentByPath("$.settings.theme") String defaultTheme(User root, String value); } ``` ### Response #### Success Response - **String**: The value at the specified path, or `null` if the value was written because it was absent. #### Response Example (No specific example provided in source, but would return the String value written or existing) ``` -------------------------------- ### walk (with controls) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Walks a node tree with full traversal controls. maxDepth < 0 means unlimited depth. Traversal starts at root path. Returning Boolean stops traversal of the current branch. ```APIDOC ## walk ### Description Walks a node tree with full traversal controls. `maxDepth < 0` means unlimited depth. Traversal starts at root path. Returning `Boolean` stops traversal of the current branch. ### Method public static void walk(Object container, Nodes.WalkTarget target, Nodes.WalkOrder order, int maxDepth, BiFunction visitor) ``` -------------------------------- ### create Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Returns adapter for supported framework types. ```APIDOC ## create(Gson, TypeToken) - Method in org.sjf4j.facade.gson.GsonModule.MyTypeAdapterFactory ### Description Returns adapter for supported framework types. ``` -------------------------------- ### create Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Creates a facade provider. ```APIDOC ## create(StreamingContext) - Method in org.sjf4j.facade.FacadeProvider ### Description Creates a facade provider. ``` -------------------------------- ### walk (basic) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Walks the node tree in top-down order and visits both containers and values. ```APIDOC ## walk ### Description Walks the node tree in top-down order and visits both containers and values. ### Method public static void walk(Object container, BiFunction visitor) ``` -------------------------------- ### NodeRegistry.ContainerInfo Constructor Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.ContainerInfo.html Details the constructor for creating a ContainerInfo instance. ```APIDOC ## Constructor ### ContainerInfo `public ContainerInfo(Class clazz, NodeKind kind, MethodHandle noArgsCtorHandle, Supplier noArgsCtorLambda)` Constructs a new ContainerInfo with the specified class, node kind, and constructor handles. ``` -------------------------------- ### org.sjf4j.node.NodeRegistry.CreatorInfo.newPojoNoArgs() Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Creates a POJO using no-args constructor path. This is a method within the CreatorInfo class. ```APIDOC ## org.sjf4j.node.NodeRegistry.CreatorInfo.newPojoNoArgs() ### Description Creates a POJO using no-args constructor path. ### Method method ### Class org.sjf4j.node.NodeRegistry.CreatorInfo ``` -------------------------------- ### Sjf4j() Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Creates a runtime instance of Sjf4j with the framework's default configuration. This is the main entry point for JSON/YAML/properties IO and node conversion. ```APIDOC ## Sjf4j() ### Description Creates a runtime instance of Sjf4j with the framework's default configuration. This is the main entry point for JSON/YAML/properties IO and node conversion. ### Method Constructor ### Endpoint N/A (Class Constructor) ``` -------------------------------- ### NodeRegistry.PojoCreationSession.finish Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Completes the POJO creation session. ```APIDOC ## finish() ### Description Completes the POJO creation session. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### startObject() - JsonpReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters object scope. ```APIDOC ## startObject() - JsonpReader ### Description Consumes and enters object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### PathSyntax Constructor Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/path/PathSyntax.html Initializes a new instance of the PathSyntax class. ```APIDOC ## PathSyntax Constructor ### Description Initializes a new instance of the PathSyntax class. ### Method Constructor ### Parameters None ``` -------------------------------- ### propertiesFacadeProvider Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/FacadeFactory.html Creates and returns a fresh instance of a properties facade. ```APIDOC ## propertiesFacadeProvider ### Description Creates a fresh properties facade instance. ### Method ```java static FacadeProvider propertiesFacadeProvider() ``` ### Returns A `FacadeProvider` for `PropertiesFacade` instances. ``` -------------------------------- ### NodeRegistry.ContainerInfo Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.ContainerInfo.html This section details the methods available in the ContainerInfo class. ```APIDOC ## Methods ### newContainer `public Object newContainer()` Creates and returns a new instance of the container. ``` -------------------------------- ### newPojoNoArgs Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.CreatorInfo.html Creates a POJO instance using the no-argument constructor. ```APIDOC ## newPojoNoArgs ### Description Creates a POJO using no-args constructor path. ### Method `public Object newPojoNoArgs()` ### Returns An instance of the POJO created via the no-argument constructor. ``` -------------------------------- ### startArray() - JsonpReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters array scope. ```APIDOC ## startArray() - JsonpReader ### Description Consumes and enters array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### stream() - JsonObject Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Returns a NodeStream starting from this object. ```APIDOC ## stream() - JsonObject ### Description Returns a NodeStream starting from this object. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response #### Success Response - **stream** (NodeStream): A NodeStream starting from this JsonObject. ``` -------------------------------- ### startObject() - SimpleJsonReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters object scope. ```APIDOC ## startObject() - SimpleJsonReader ### Description Consumes and enters object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - StreamingWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Writes the start of a JSON object '{' ```APIDOC ## startObject() - StreamingWriter ### Description Writes the start of a JSON object '{' ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Writes to output stream) ``` -------------------------------- ### nodeFacadeProvider Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/FacadeFactory.html Creates and returns a fresh instance of a node facade. ```APIDOC ## nodeFacadeProvider ### Description Creates a fresh node facade instance. ### Method ```java static FacadeProvider nodeFacadeProvider() ``` ### Returns A `FacadeProvider` for `NodeFacade` instances. ``` -------------------------------- ### startArray() - SimpleJsonReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters array scope. ```APIDOC ## startArray() - SimpleJsonReader ### Description Consumes and enters array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startArray() - StreamingWriter Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Writes the start of a JSON array '[' ```APIDOC ## startArray() - StreamingWriter ### Description Writes the start of a JSON array '[' ### Method N/A (Interface method) ### Endpoint N/A ### Parameters None ### Response None (Writes to output stream) ``` -------------------------------- ### GsonModule.JsonArrayAdapter Constructor Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Constructor for GsonModule's JsonArrayAdapter. ```APIDOC ## GsonModule.JsonArrayAdapter(Gson, Class) ### Description Creates an adapter for JsonArray or its subclass. ### Method Constructor ### Endpoint N/A ### Parameters - **gson** (Gson) - Description not available - **clazz** (Class) - Description not available ### Request Example None ### Response None ``` -------------------------------- ### getStringByPath(String) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the value at the specified JSON path as a String from a JsonContainer. ```APIDOC ## getStringByPath(String) ### Description Gets the value at the specified JSON path as a String. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters #### Path Parameters - **String** (String) - Required - The JSON path to retrieve the value from. ### Response #### Success Response - **String** - The String value found at the specified path. ``` -------------------------------- ### Sjf4j OperationRegistry Get Method Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Retrieves a handler for a specific patch operation. ```APIDOC ## OperationRegistry.get(String) ### Description Returns handler for operation name, or null. ### Method `get` ### Parameters - **operationName** (String) - The name of the operation. ### Response - Returns the handler for the operation, or null if not found. ``` -------------------------------- ### defaultValueFormat(Class) - StreamingContext Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the default value format for a given class. ```APIDOC ## defaultValueFormat(Class) ### Description Gets the default value format for a given class. ### Method `defaultValueFormat(Class type)` ### Class `org.sjf4j.facade.StreamingContext` ``` -------------------------------- ### newPojoWithArgs Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.CreatorInfo.html Creates a POJO instance using the argument creator. ```APIDOC ## newPojoWithArgs ### Description Creates a POJO using argument creator path. ### Method `public Object newPojoWithArgs(Object[] args)` ### Parameters - **args** (Object[]) - An array of objects representing the arguments to pass to the creator. ### Returns An instance of the POJO created via the argument creator. ``` -------------------------------- ### Array and Object Size Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/jackson3/Jackson3Nodes.html Methods to get the size of JSON arrays and objects. ```APIDOC ## sizeInArray ### Description Returns the number of elements in a JSON array. ### Method `static int sizeInArray(Object node)` ### Parameters - `node` (Object) - The JSON array node. ## sizeInObject ### Description Returns the number of key-value pairs in a JSON object. ### Method `static int sizeInObject(Object node)` ### Parameters - `node` (Object) - The JSON object node. ``` -------------------------------- ### Sjf4j.Builder Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Methods for building Sjf4j runtime instances. ```APIDOC ## Sjf4j.Builder Methods ### `build()` Builds a new isolated `Sjf4j` runtime from the current builder state. ### `builder()` Creates a builder with default settings. ### `builder(Sjf4j)` Creates a builder initialized from an existing instance. ### `Builder()` Creates a builder with framework-default facade providers and serialization behavior. ### `Builder(Sjf4j)` Creates a builder initialized from an existing runtime instance. ``` -------------------------------- ### Jackson2StreamingIO Constructor Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/jackson2/Jackson2StreamingIO.html Initializes a new instance of the Jackson2StreamingIO class. ```APIDOC ## Jackson2StreamingIO() ### Description Constructs a new Jackson2StreamingIO object. ### Method Constructor ### Parameters None ``` -------------------------------- ### getBooleanByPath Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the value at the specified JSON path as a Boolean, optionally with a default value. ```APIDOC ## getBooleanByPath ### Description Gets the value at the specified JSON path as a Boolean, with an optional default value. ### Methods - `getBooleanByPath(String)` in `org.sjf4j.JsonContainer` - `getBooleanByPath(String, boolean)` in `org.sjf4j.JsonContainer` ``` -------------------------------- ### getBigIntegerByPath Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the value at the specified JSON path as a BigInteger, optionally with a default value. ```APIDOC ## getBigIntegerByPath ### Description Gets the value at the specified JSON path as a BigInteger, with an optional default value. ### Methods - `getBigIntegerByPath(String)` in `org.sjf4j.JsonContainer` - `getBigIntegerByPath(String, BigInteger)` in `org.sjf4j.JsonContainer` ``` -------------------------------- ### getBigDecimalByPath Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the value at the specified JSON path as a BigDecimal, optionally with a default value. ```APIDOC ## getBigDecimalByPath ### Description Gets the value at the specified JSON path as a BigDecimal, with an optional default value. ### Methods - `getBigDecimalByPath(String)` in `org.sjf4j.JsonContainer` - `getBigDecimalByPath(String, BigDecimal)` in `org.sjf4j.JsonContainer` ``` -------------------------------- ### Sjf4j JsonPath Get Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Methods for retrieving values from a JSON structure using JsonPath. ```APIDOC ## JsonPath.get(Object, Class) ### Description Returns a value at this path converted to the given type. ### Method `get` ### Parameters - **json** (Object) - The JSON object or structure to query. - **targetClass** (Class) - The target Java class to convert the value to. ### Response - Returns the value found at the specified path, converted to the target type. ``` ```APIDOC ## JsonPath.get(Object, T...) ### Description Returns a value at this path converted to the inferred type parameter. ### Method `get` ### Parameters - **json** (Object) - The JSON object or structure to query. - **varargs** (T...) - Varargs to infer the target type. ### Response - Returns the value found at the specified path, converted to the inferred type. ``` ```APIDOC ## JsonPath.getArray(Object) ### Description Returns an Object array at this path using strict conversion. ### Method `getArray` ### Parameters - **json** (Object) - The JSON object or structure to query. ### Response - Returns an Object array found at the specified path. ``` ```APIDOC ## JsonPath.getArray(Object, Class) ### Description Returns a typed array at this path using strict conversion. ### Method `getArray` ### Parameters - **json** (Object) - The JSON object or structure to query. - **elementType** (Class) - The target Java class for the elements of the array. ### Response - Returns a typed array found at the specified path. ``` -------------------------------- ### Sjf4j JsonObject Get Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Methods for retrieving values from a JsonObject, with type conversion options. ```APIDOC ## JsonObject.get(String, Class) ### Description Returns a value converted to the given type. ### Method `get` ### Parameters - **key** (String) - The key of the value to retrieve. - **targetClass** (Class) - The target Java class to convert the value to. ### Response - Returns the value associated with the key, converted to the target type. ``` ```APIDOC ## JsonObject.get(String, T...) ### Description Returns a value converted to the inferred type. ### Method `get` ### Parameters - **key** (String) - The key of the value to retrieve. - **varargs** (T...) - Varargs to infer the target type. ### Response - Returns the value associated with the key, converted to the inferred type. ``` ```APIDOC ## JsonObject.getArray(String) ### Description Returns an Object array using strict conversion. ### Method `getArray` ### Parameters - **key** (String) - The key of the array value to retrieve. ### Response - Returns an Object array representing the value associated with the key. ``` -------------------------------- ### Sjf4j JsonArray Get Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Methods for retrieving elements from a JsonArray, with type conversion options. ```APIDOC ## JsonArray.get(int, Class) ### Description Returns a value converted to the given type. ### Method `get` ### Parameters - **index** (int) - The index of the element to retrieve. - **targetClass** (Class) - The target Java class to convert the element to. ### Response - Returns the element at the specified index, converted to the target type. ``` ```APIDOC ## JsonArray.get(int, T...) ### Description Returns a value converted to the inferred type. ### Method `get` ### Parameters - **index** (int) - The index of the element to retrieve. - **varargs** (T...) - Varargs to infer the target type. ### Response - Returns the element at the specified index, converted to the inferred type. ``` ```APIDOC ## JsonArray.getArray(int) ### Description Returns an Object array using strict conversion. ### Method `getArray` ### Parameters - **index** (int) - The index of the array element to retrieve. ### Response - Returns an Object array representing the element at the specified index. ``` ```APIDOC ## JsonArray.getArray(int, Class) ### Description Returns a typed array using strict conversion. ### Method `getArray` ### Parameters - **index** (int) - The index of the array element to retrieve. - **elementType** (Class) - The target Java class for the elements of the array. ### Response - Returns a typed array representing the element at the specified index. ``` -------------------------------- ### getStringByPath(String, String) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Gets the value at the specified JSON path as a String, with a default value, from a JsonContainer. ```APIDOC ## getStringByPath(String, String) ### Description Gets the value at the specified JSON path as a String, with a default value. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters #### Path Parameters - **String** (String) - Required - The JSON path to retrieve the value from. - **String** (String) - Required - The default value to return if the path is not found. ### Response #### Success Response - **String** - The String value found at the specified path, or the default value. ``` -------------------------------- ### TwoSimpleModule(StreamingContext) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Constructor for TwoSimpleModule, used for creating modules and installing reader/writer modifiers in Jackson2 and Jackson3. ```APIDOC ## TwoSimpleModule(StreamingContext) ### Description Creates module and installs reader/writer modifiers. ### Method Constructor ### Classes org.sjf4j.facade.jackson2.Jackson2Module.TwoSimpleModule org.sjf4j.facade.jackson3.Jackson3Module.TwoSimpleModule ``` -------------------------------- ### Get Operation Handler Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/patch/OperationRegistry.html Retrieves the registered handler for a given operation name. If no handler is found, it returns null. ```APIDOC ## get ### Description Returns handler for operation name, or null. ### Method ```java public static OperationRegistry.OperationHandler get(String op) ``` ### Parameters * **op** (String) - The name of the operation to retrieve the handler for. ### Returns * **OperationRegistry.OperationHandler** - The handler for the operation, or null if not found. ``` -------------------------------- ### startObject() - Fastjson2Reader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters object scope. ```APIDOC ## startObject() - Fastjson2Reader ### Description Consumes and enters object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### FacadeProvider Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Factory contract for creating configured facade instances. ```APIDOC ## FacadeProvider ### Description Factory contract for creating configured facade instances. ### Interface org.sjf4j.facade.FacadeProvider ``` -------------------------------- ### getInArray(Object node, int idx, Class clazz) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Gets a value by index from an array-like node and converts it to the requested target type. ```APIDOC ## getInArray(Object node, int idx, Class clazz) ### Description Gets a value by index from an array-like node and converts it to the requested target type. ### Method public static T getInArray(Object node, int idx, Class clazz) ### Parameters #### Path Parameters - **node** (Object) - the array-like node - **idx** (int) - the index of the value to retrieve - **clazz** (Class) - the target class to convert the value to ### Response #### Success Response (200) - **T** - the converted value ``` -------------------------------- ### startObject() - GsonReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters object scope. ```APIDOC ## startObject() - GsonReader ### Description Consumes and enters object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### startObject() - Jackson2Reader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters object scope. ```APIDOC ## startObject() - Jackson2Reader ### Description Consumes and enters object scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### getInObject(Object node, String key, Class clazz) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Gets a value by key from an object-like node and converts it to the requested target type. ```APIDOC ## getInObject(Object node, String key, Class clazz) ### Description Gets a value by key from an object-like node and converts it to the requested target type. ### Method public static T getInObject(Object node, String key, Class clazz) ### Parameters #### Path Parameters - **node** (Object) - the object-like node - **key** (String) - the key of the value to retrieve - **clazz** (Class) - the target class to convert the value to ### Response #### Success Response (200) - **T** - the converted value ``` -------------------------------- ### Gson Array Operations Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/gson/GsonNodes.html Methods for interacting with Gson array nodes, including checking for matches, iterating, getting elements, and checking size. ```APIDOC ## anyMatchArray ### Description Returns true when any item matches predicate. ### Method `static boolean anyMatchArray(Object node, BiPredicate predicate)` ## forEachArray ### Description Visits items of Gson array node. ### Method `static void forEachArray(Object node, BiConsumer consumer)` ## getAccessInArray ### Description Resolves readable child access info for Gson array node. ### Method `static void getAccessInArray(Object node, int idx, Nodes.Access out)` ## getInArray ### Description Returns array item value from Gson array node. ### Method `static Object getInArray(Object node, int idx)` ## iteratorInArray ### Description Returns iterator over Gson array node. ### Method `static Iterator iteratorInArray(Object node)` ## sizeInArray ### Description Returns number of items in Gson array node. ### Method `static int sizeInArray(Object node)` ## toArray ### Description Converts Gson array node to Object array. ### Method `static Object[] toArray(Object node)` ## toJsonArray ### Description Converts Gson array node to JsonArray. ### Method `static JsonArray toJsonArray(Object node)` ## toList ### Description Converts Gson array node to List. ### Method `static List toList(Object node)` ## toSet ### Description Converts Gson array node to Set. ### Method `static Set toSet(Object node)` ``` -------------------------------- ### startArray() - Fastjson2Reader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters array scope. ```APIDOC ## startArray() - Fastjson2Reader ### Description Consumes and enters array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### Get Captured Target Type Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/TypeReference.html The getType() method returns the captured target type. This is useful for introspection or when the type information needs to be accessed programmatically. ```java public Type getType() ``` -------------------------------- ### startArray() - GsonReader Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Consumes and enters array scope. ```APIDOC ## startArray() - GsonReader ### Description Consumes and enters array scope. ### Method N/A (Class method) ### Endpoint N/A ### Parameters None ### Response None (Modifies internal state) ``` -------------------------------- ### Define a Compiled Mapper Interface Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/mapper/CompiledMapper.html Use the @CompiledMapper annotation to define an interface that will be compiled into a mapper. This example shows a simple mapping from a User object to a UserDto, renaming the 'lastName' field to 'surname'. ```java @CompiledMapper interface Users { @Mapping(target = "surname", source = "lastName") UserDto toDto(User user); } ``` -------------------------------- ### ValueCodecInfo Constructor Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.ValueCodecInfo.html The constructor for ValueCodecInfo creates an immutable holder for value-codec metadata. It requires the codec name, value and raw class types, and method handles for value-to-raw, raw-to-value, and value copy operations. ```APIDOC ## ValueCodecInfo Constructor ### Description Creates immutable value-codec metadata holder. ### Signature `public ValueCodecInfo(String codecName, Class valueClazz, Class rawClazz, ValueCodec valueCodec, MethodHandle valueToRawHandle, MethodHandle rawToValueHandle, MethodHandle valueCopyHandle)` ### Parameters * **codecName** (String) - The name of the codec. * **valueClazz** (Class) - The Java class representing the value type. * **rawClazz** (Class) - The Java class representing the raw type. * **valueCodec** (ValueCodec) - The ValueCodec instance. * **valueToRawHandle** (MethodHandle) - Method handle for encoding value to raw representation. * **rawToValueHandle** (MethodHandle) - Method handle for decoding raw value to value representation. * **valueCopyHandle** (MethodHandle) - Method handle for copying value. ``` -------------------------------- ### getInObject(Object node, String key) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Gets a value by key from an object-like node. Only readable members participate in this view. For POJO nodes, properties without a getter behave as absent and return `null`. ```APIDOC ## getInObject(Object node, String key) ### Description Gets a value by key from an object-like node. Only readable members participate in this view. For POJO nodes, properties without a getter behave as absent and return `null`. ### Method public static Object getInObject(Object node, String key) ### Parameters #### Path Parameters - **node** (Object) - the object-like node - **key** (String) - the key of the value to retrieve ### Response #### Success Response (200) - **Object** - the value associated with the key, or null if absent ``` -------------------------------- ### JsonPath Get Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/path/JsonPath.html Provides methods to retrieve data of various types from a JSON structure at a specified path. These methods include options for specifying default values when the path does not exist or the value is null. ```APIDOC ## JsonPath Get Methods ### Description Methods to retrieve data of various types (BigInteger, Boolean, Byte, Double, Float, Integer, JsonArray, JsonObject, List, Long, Map, Number, Set, Short, String) from a JSON structure at a specified path. Overloads are available to provide a default value if the path is not found or the value is null. ### Methods - `getBigInteger(Object container)` - `getBigInteger(Object container, BigInteger defaultValue)` - `getBoolean(Object container)` - `getBoolean(Object container, boolean defaultValue)` - `getByte(Object container)` - `getByte(Object container, byte defaultValue)` - `getDouble(Object container)` - `getDouble(Object container, double defaultValue)` - `getFloat(Object container)` - `getFloat(Object container, float defaultValue)` - `getInt(Object container)` - `getInt(Object container, int defaultValue)` - `getJsonArray(Object container)` - `getJsonObject(Object container)` - `getList(Object container)` - `getList(Object container, Class clazz)` - `getLong(Object container)` - `getLong(Object container, long defaultValue)` - `getMap(Object container)` - `getMap(Object container, Class clazz)` - `getNode(Object container)` - `getNode(Object container, Object defaultValue)` - `getNumber(Object container)` - `getNumber(Object container, Number defaultValue)` - `getSet(Object container)` - `getSet(Object container, Class clazz)` - `getShort(Object container)` - `getShort(Object container, short defaultValue)` - `getString(Object container)` - `getString(Object container, String defaultValue)` ### Parameters - `container` (Object) - The JSON structure to query. - `defaultValue` - The value to return if the path is not found or the value is null. The type depends on the specific get method. - `clazz` (Class) - The class type for generic List or Map retrieval. ### Response - Returns the value at the specified path, or the default value if provided and the path is not found or null. - Returns `null` if no default value is provided and the path is not found or null. ``` -------------------------------- ### Utility and Reflection Methods Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Utility methods for reflection and accessing codec information. ```APIDOC ## getCodecName(AnnotatedElement) ### Description Gets the codec name for a given annotated element. ### Method GET ### Endpoint N/A (Static method in ReflectUtil) ### Parameters #### Path Parameters - **element** (AnnotatedElement) - Required - The annotated element. ### Response #### Success Response (200) - **codecName** (String) - The name of the codec. ## getCodecPattern(AnnotatedElement) ### Description Gets the codec pattern for a given annotated element. ### Method GET ### Endpoint N/A (Static method in ReflectUtil) ### Parameters #### Path Parameters - **element** (AnnotatedElement) - Required - The annotated element. ### Response #### Success Response (200) - **codecPattern** (String) - The pattern of the codec. ## getExplicitName(AnnotatedElement) ### Description Gets the explicit name for a given annotated element. ### Method GET ### Endpoint N/A (Static method in ReflectUtil) ### Parameters #### Path Parameters - **element** (AnnotatedElement) - Required - The annotated element. ### Response #### Success Response (200) - **explicitName** (String) - The explicit name. ## getFunctionNames() ### Description Returns all registered function names from the FunctionRegistry. ### Method GET ### Endpoint N/A (Static method in FunctionRegistry) ### Response #### Success Response (200) - **functionNames** (List) - A list of all registered function names. ## getGenericComponentType() ### Description Returns the generic component type of a GenericArrayTypeImpl. ### Method GET ### Endpoint N/A (Method within Types.GenericArrayTypeImpl) ### Response #### Success Response (200) - **genericComponentType** (Type) - The generic component type. ``` -------------------------------- ### Mapping from Qualified Source Parameters Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/mapper/Mapping.html When a mapper method has multiple source parameters, qualify source names with the parameter name and a colon to specify which parameter to read from. This example reads the 'name' property from the 'customer' parameter. ```java "customer:name" ``` -------------------------------- ### PutIfParentPresentByPath Example - Java Interface Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/PutIfParentPresentByPath.html Demonstrates how to use the PutIfParentPresentByPath annotation to define a method that conditionally writes a value. The method will only succeed if the parent path exists; otherwise, it returns null or completes without modification. ```java @CompiledPath interface Users { @PutIfParentPresentByPath("$.profile.email") String email(User root, String value); } ``` -------------------------------- ### org.sjf4j.facade.fastjson2.Fastjson2Module.SimpleReaderModule Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Constructor for SimpleReaderModule. ```APIDOC ## SimpleReaderModule(StreamingContext) ### Description Simple reader module for Fastjson2. ### Method constructor ### Parameters #### Path Parameters - **context** (StreamingContext) - Required - The streaming context. ``` -------------------------------- ### Using SJF4J Path for Source Property Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/mapper/Mapping.html You can use SJF4J paths with '$' or '/' to access nested properties or elements within a source parameter. This example accesses the 'name' property within the 'profile' object of the 'customer' parameter. ```java "customer:$.profile.name" ``` -------------------------------- ### org.sjf4j.facade.simple.SimplePropertiesFacade Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Constructor for the SimplePropertiesFacade. ```APIDOC ## SimplePropertiesFacade() ### Description Properties facade based on JSONPath expansion. ### Method constructor ``` -------------------------------- ### Example Usage of GetByPath Annotation Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/GetByPath.html Demonstrates how to use the @GetByPath annotation to generate a method for reading a specific field from a JSON structure. The method signature includes the root object and an index parameter, with the return type specified as String. ```java @CompiledPath interface Users { @GetByPath("$.users[{idx}].name") String name(Model root, int idx); } ``` -------------------------------- ### EnsurePutByPath Annotation Example Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/EnsurePutByPath.html This snippet demonstrates how to use the @EnsurePutByPath annotation to define a method that writes a value to a specific JSON path. It automatically creates intermediate nodes if they don't exist. The method signature includes the root object and the value to be written. ```java @CompiledPath interface Users { @EnsurePutByPath("$.profile.contacts[0].email") String email(User root, String value); } ``` -------------------------------- ### head Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Returns the first non-root token in the path. ```APIDOC ## head() ### Description Returns the first non-root token in the path. ### Method instance ### Class org.sjf4j.path.JsonPath ``` -------------------------------- ### yamlFacadeProvider Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/facade/FacadeFactory.html Returns the default YAML facade, which is typically SnakeYAML. ```APIDOC ## yamlFacadeProvider ### Description Returns default YAML facade (SnakeYAML). ### Method ```java static FacadeProvider> yamlFacadeProvider() ``` ### Returns A `FacadeProvider` for `YamlFacade` instances. ``` -------------------------------- ### getInArray(Object node, int idx) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/Nodes.html Gets a value by index from an array-like node. Negative indexes are supported (`-1` means last element). For List, Array, and Set, out-of-range access returns `null`. JsonArray behavior follows `JsonArray.getNode(int)`. ```APIDOC ## getInArray(Object node, int idx) ### Description Gets a value by index from an array-like node. Negative indexes are supported (`-1` means last element). For List, Array, and Set, out-of-range access returns `null`. JsonArray behavior follows `JsonArray.getNode(int)`. ### Method public static Object getInArray(Object node, int idx) ### Parameters #### Path Parameters - **node** (Object) - the array-like node - **idx** (int) - the index of the value to retrieve ### Response #### Success Response (200) - **Object** - the value at the specified index, or null if out of range ``` -------------------------------- ### org.sjf4j.node.NodeRegistry.CreatorInfo.newPojoWithArgs(Object[]) Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/index-all.html Creates a POJO using argument creator path. This is a method within the CreatorInfo class. ```APIDOC ## org.sjf4j.node.NodeRegistry.CreatorInfo.newPojoWithArgs(Object[]) ### Description Creates a POJO using argument creator path. ### Method method ### Class org.sjf4j.node.NodeRegistry.CreatorInfo ``` -------------------------------- ### Generating a Direct Write Method with @PutByPath Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/annotation/path/PutByPath.html This example demonstrates how to use the @PutByPath annotation to generate a method that updates a specific field ('name') within a JSON array element. The method takes the root object, an index for the array, and the new value as parameters. The generated method will perform a direct write operation. ```java @CompiledPath interface Users { @PutByPath("$.users[{idx}].name") String name(Model root, int idx, String value); } ``` -------------------------------- ### forceNewPojo Source: https://javadoc.io/doc/org.sjf4j/sjf4j/latest/org/sjf4j/node/NodeRegistry.CreatorInfo.html Creates a POJO, preferring the no-argument constructor, falling back to the argument creator if necessary. ```APIDOC ## forceNewPojo ### Description Creates a POJO preferring no-args constructor, then args creator. ### Method `public Object forceNewPojo()` ### Returns An instance of the POJO created, prioritizing the no-argument constructor. ```