JSON to object in Java
问题 I have the following JSON: { "book":{ "isbn" : "12356789", "title" : "Algorithm", "author" : [ "Cormen", "Rivest", "Stein" ], "price" : 45.78 } } I need to convert this JSON string to a Book class. I don't want to set it property by property. Also, I don't want to use Gson. I want to do something as: Book book=jsonReader.readObject().toClass(Book.class); How can I do it with javax.json.Json or Moxy ? 回答1: I would recommend NOT using anything other than Jackson to process json. A Jackson based