Skip to content

Tag: object

Loop Object from a single Array

im sending a Json Array from Activity A to Activity B, and i want to populate that Json Array into Spinner in Activity B. but when i Log the json array from Activity A, the data becomes a single object “NVAKSINATOR” : [{“NVAKSINATOR”:”[{“NVAKSINATOR”:”20800&#824…

How to access repeated elements in JSON object java?

At first: I know, there are many questions like this one, but all the answers don’t help. I am new to JSON and appreciate every answer. I have a JSON object like this: The JSON object can have hundreds of these elements which begin with “type” : “node”. Now I want to access all l…

Converting Class of an Object into a Child Class

Say I have the following classes Then I get an object from an array of Parents If this object is of the child class, I want to cast the tempParent into the child class in order to use “doSomething” without having to create a new object This, however, does not work. I still get an error telling me …