0

I have "Form Designer" web application, in which I need to post the controls of the new form to an ASP.Net page to insert to DB, each time I create form control. I push it into two dimensional array, when user click save, this array will be serialized and sent to Server Page using Ajax.

Array string After Serialization Looks Like :

[
    [
        {"id":"cont_menu_tb1"},
        {"name":"cont_menu_tb1"},
        {"zindex":"500"},
        {"top":"128"},
        {"left":"214"}

    ]
    ,
    [
        {"id":"cont_menu_tb2"},     
            {"name":"cont_menu_tb2"},
        {"zindex":"500"},
        {"top":"275"},
        {"left":"203"}
    ]
]

I used JSON.stringify(objCF_JSON) to serialize it. Now how to De-Serialize the Array Again using Newton in VB.Net into two dimensional arrays?

2 Answers 2

1

It is not a two dimensional array, it is a single dimension array with 2 objects.

List<SomeObject> objects = JsonConvert.DeserializeObject<List<SomeObject>>(json);

where SomeObject has the properties name, width, height

Sign up to request clarification or add additional context in comments.

1 Comment

thanks Tony, my problem was in String Format , also in Newton DLL, the problem was in Datatypes of the class
0

Also you can use another one function of JSON library to deserialize string to object - JSON.parse(stringedObj).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.