1

I have the following metadata for the artist Joseph Turner:

{ "activePlaceCount":0, "birth":{ "place":{ "name":"London, United Kingdom", "placeName":"London", "placeType":"inhabited_place" }, "time":{ "startYear":1775 } }, "birthYear":1775, "date":"1775\u20131851", "death":{ "place":{ "name":"Chelsea, United Kingdom", "placeName":"Chelsea", "placeType":"neighbourhood" }, "time":{ "startYear":1851 } }, "fc":"Joseph Mallord William Turner", "gender":"Male", "id":558, "mda":"Turner, Joseph Mallord William", "movements":[ { "era":{ "id":290, "name":"18th century" }, "id":345, "name":"Picturesque" }, { "era":{ "id":350, "name":"19th century" }, "id":364, "name":"Romanticism" }, { "era":{ "id":290, "name":"18th century" }, "id":349, "name":"Sublime" } ], "startLetter":"T", "totalWorks":41861, "url":"http://www.tate.org.uk/art/artists/joseph-mallord-william-turner-558" } 

If I wanted to map fc to firstName in my Java program, I could simply do the following:

@JsonProperty("fc") private String fullName; 

That, or private String fc.

What would I do if wanted to retrieve "death"."time"."startYear"?

1
  • 1
    Not (easily) with jackson objectmapper but you could use different libraries especially if you're interested in just reading json: github.com/jayway/JsonPath Commented Nov 5, 2015 at 19:44

1 Answer 1

1

Based on this SO answer, it is currently not possible to create an annotation of this sort, but it is a ticket for the future (updates of Java).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.