0

I need to convert json to a useful string like this:

    COLUMN1:DATA1;COLUMN2:DATA2;............. 
    COLUMN1:DATA3;COLUMN2:DATA4;.............
    ..............................

I can't use a static class where I put these data, because the columnsname, workspacesname etc. are always different. I found the json framework but didn't come along with this. If some would be so nice and can put in here a little sample, I would be happy.

Thanks Patrick

1 Answer 1

1

i also find that DynamicJson is a very good solution for this. It will also work if everything is dynamic (yes, also the keys...)

Here is an example of the DynamicJson Page:

// DynamicJson - (IsObject)
var objectJson = DynamicJson.Parse(@"{""foo"":""json"",""bar"":100}");
foreach (KeyValuePair<string, dynamic> item in objectJson)
{
    Console.WriteLine(item.Key + ":" + item.Value); // foo:json, bar:100
}

I think this example is exactly what you need. Good Luck. (It will also work with nested objects/arrays)

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

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.