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\"}");
More Related Contents:
- Parsing JSON in Java without knowing JSON format
- Converting JSON data to Java object
- Configuring ObjectMapper in Spring
- Do JSON keys need to be unique? [duplicate]
- Custom JSON Deserialization with Jackson
- Should I declare Jackson’s ObjectMapper as a static field?
- How to read json file into java with simple JSON library
- Parse JSON file using GSON
- How to parse a JSON string to an array using Jackson
- Jackson: How to add custom property to the JSON without modifying the POJO
- Right way to write JSON deserializer in Spring or extend it
- Setting default values to null fields when mapping with Jackson
- Jackson – How to process (deserialize) nested JSON?
- Jackson/Hibernate, meta get methods and serialization
- Is Jackson’s @JsonSubTypes still necessary for polymorphic deserialization?
- Jackson 2.0 with Spring 3.1
- How to access default jackson serialization in a custom serializer
- Jackson 3rd Party Class With No Default Constructor
- Jackson: how to prevent field serialization [duplicate]
- Json and Java – Circular Reference
- Can not deserialize instance of java.util.ArrayList out of VALUE_STRING
- Enforce not-null field in JSON object
- How to compare JSON documents and return the differences with Jackson or Gson?
- Spring 3.0 making JSON response using jackson message converter
- How to annotate enum fields for deserialization using Jackson json
- Parsing JSON File Java [duplicate]
- Jackson Serialize Instant to Nanosecond Issue
- How to deserialize JSON into flat, Map-like structure?
- Parse JSON object with string and value only
- Jackson deserialize based on type