A slight variation on Richards answer but readTree can take a string so you can simplify it to:

ObjectMapper mapper = new ObjectMapper();
JsonNode actualObj = mapper.readTree("{\"k1\":\"v1\"}");
Answer from slashnick on Stack Overflow
🌐
Medium
medium.com › @salvipriya97 › jsonnode-explained-with-examples-d0c05324f61d
JsonNode explained with examples. What is JsonNode in Java? | by Priya Salvi | Medium
July 2, 2024 - { "fullName": "Jane Doe", "email": "jane.doe@example.com", "transactionId": "abc123", "amount": 250.75 } ... import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.da...
🌐
Jenkov
jenkov.com › tutorials › java-json › jackson-jsonnode.html
Jackson JsonNode
To read JSON into a JsonNode with Jackson, you start by creating a Jackson ObjectMapper instance. On the ObjectMapper instance you call readTree() passing the JSON source as parameter. Here is an example of deserializing JSON into a JsonNode:
🌐
Baeldung
baeldung.com › home › json › jackson › working with tree model nodes in jackson
Working with Tree Model Nodes in Jackson | Baeldung
January 8, 2024 - JsonNode locatedNode = rootNode.path("name").path("last"); Alternatively, the get or with APIs can also be used instead of path. If the path isn’t known, the search will, of course, become more complex and iterative. We can see an example of iterating over all the nodes in Section 5 – Iterating Over the Nodes.
🌐
Mkyong
mkyong.com › home › java › jackson tree model examples
Jackson Tree Model examples - Mkyong.com
April 29, 2024 - JsonNode rootArray = mapper.readTree(new File("c:\\projects\\user2.json")); for (JsonNode root : rootArray) { // get node like the above example 1 }
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.text.json.nodes.jsonnode
JsonNode Class (System.Text.Json.Nodes) | Microsoft Learn
public ref class JsonNode abstract · public abstract class JsonNode · type JsonNode = class · Public MustInherit Class JsonNode · Inheritance · Object JsonNode · Derived · System.Text.Json.Nodes.JsonArray · System.Text.Json.Nodes.JsonObject · System.Text.Json.Nodes.JsonValue ·
🌐
Javadoc.io
javadoc.io › doc › com.fasterxml.jackson.core › jackson-databind › latest › com › fasterxml › jackson › databind › JsonNode.html
JsonNode - jackson-databind 2.21.2 javadoc
Bookmarks · Latest version of com.fasterxml.jackson.core:jackson-databind · https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind · Current version 2.21.2 · https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind/2.21.2 · package-list path (used for javadoc generation ...
🌐
Baeldung
baeldung.com › home › json › jackson › get all the keys in a json string using jsonnode
Get all the Keys in a JSON String Using JsonNode | Baeldung
May 11, 2024 - Let’s try it with a simple example: public List<String> getKeysInJsonUsingJsonNodeFieldNames(String json, ObjectMapper mapper) throws JsonMappingException, JsonProcessingException { List<String> keys = new ArrayList<>(); JsonNode jsonNode = mapper....
🌐
Nim
nim-lang.org › docs › json.html
std/json
parseJsonFragments(s: Stream; filename: string = ""; rawIntegers = false; rawFloats = false): JsonNode
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › standard › serialization › system-text-json › use-dom
How to use a JSON DOM in System.Text.Json - .NET | Microsoft Learn
October 20, 2024 - To compare two JsonNode objects for equality, including their descendant elements, use the JsonNode.DeepEquals(JsonNode, JsonNode) method. The following example shows how to use the JsonDocument class for random access to data in a JSON string:
🌐
Javatpoint
javatpoint.com › parsing-string-to-jsonnode-jackson
Parsing String to JsonNode Jackson - javatpoint
Parsing String to JsonNode Jackson with Jackson Tutorial, Setup Environment, First Application Jackson, ObjectMapper Class, Object Serialization using Jackson, Data Binding, Tree Model etc.
🌐
TutorialsPoint
tutorialspoint.com › how-to-access-the-json-fields-arrays-and-nested-objects-of-jsonnode-in-java
How to access the JSON fields, arrays and nested objects of JsonNode in Java?
May 13, 2025 - To read JSON into a JsonNode with Jackson by creating an ObjectMapper instance and call the readValue() method.
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.text.json.nodes.jsonnode.parse
JsonNode.Parse Method (System.Text.Json.Nodes) | Microsoft Learn
static member Parse : string * Nullable<System.Text.Json.Nodes.JsonNodeOptions> * System.Text.Json.JsonDocumentOptions -> System.Text.Json.Nodes.JsonNode