skip to Main Content

Php – Unserialize string incoming string

I have serialized array. It is serialized into string looking like: *field1_name*|*field1_value*;*field2_name*|*field2_value*;*field3_name*|*field3_value* etc. I need to get value of field 3. At this moment i get it by: explode("*|*", explode("*;*", serialized_array)[3])[1] but i'm almost sure that there is better way…

VIEW QUESTION

Javascript – Filtering JSON array as easy as XML

In my project I am moving from XML format to JSON format. I have XML which consists from nodes like this: <Creature> <Name>Someone</Name> <Desert>false</Desert> <Woods>false</Woods> <Mountains>false</Mountains> <Swamp>false</Swamp> </Creature> And the radio list with values equal to the tags names. Like…

VIEW QUESTION

How to read several Json arrays from input and convert them to Java array or List

I'm receiving an input of one or more Json arrays like [{"operation":"buy", "unit-cost":10.00, "quantity": 10000}, {"operation":"sell", "unit-cost":20.00, "quantity": 5000}] [{"operation":"buy", "unit-cost":20.00, "quantity": 10000}, {"operation":"sell", "unit-cost":10.00, "quantity": 5000}] I tried to read the array using JSON-Java in this way: JSONArray array…

VIEW QUESTION
Back To Top
Search