InterviewSolution
| 1. |
Why Is It Not Possible To Deserialize A Json String Starting With An Array? |
|
Answer» XStream's implementation to deserialize JSON is based on Jettison and StAX. Jettison implements a XMLStreamReader of StaX and transforms the PROCESSED JSON virtually into XML first. HOWEVER, if the JSON string starts with an ARRAY it is not possible for Jettison to create a valid ROOT element, since it has no name. XStream's implementation to deserialize JSON is based on Jettison and StAX. Jettison implements a XMLStreamReader of StaX and transforms the processed JSON virtually into XML first. However, if the JSON string starts with an array it is not possible for Jettison to create a valid root element, since it has no name. |
|