readValue and readTree in Jackson: when to use which?

readValue() can be used for any and all types, including JsonNode. readTree() only works for JsonNode (tree model); and is added for convenience.

Note that you NEVER want to use your first example: it is equivalent to writing out your node as JSON, then reading it back — just cast it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)