Skip to main content

I have a text field that stores stores an array - formatted as either and HTTP POST or JSON array. Can I have this array displayed as a editable table?


HTTP POST:
items[0][Name]=Shirt&items[0][Quantity]=2&items[0][Price]=19.95&items[1][Name]=Jeans&items[0][Quantity]=3&items[0][Price]=89.99


JSON:
{“items”:


{"Name":"Shirt", "Quantity":"2", "Price":"19.95"}, {"Name":"Jeans", "Quantity":"3", "Price":"89.99"}, ]}

Interesting question, Griffin.

Can you create a custom object that is just used for CRUD operations on the JSON Data?  You’ll need to populate the model i.e deserialize from JSON to custom object and then determine best time to serialize back to JSON, store in the Text field and clean up the records in the custom object. Seems like a lot of ceremony, though.

Have you considered a custom renderer?  


You could do it with a custom table view.



Reply