0

I have the following json structure:

{
    "data": [
        {
            "number": 123,
            "animal": "mush"
        },
        {
            "number": "123",
            "animal": ""
        }
    ],
    "animal_id": 1
}

How can I save it as a string?

2
  • 2
    What language you work with? Commented Jun 16, 2016 at 12:51
  • 1
    Possible duplicate of Parse Json to String Commented Jun 16, 2016 at 12:52

1 Answer 1

2

It varies by language, but in JavaScript (which might be likely used in your case), JSON.stringify does this job.

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

1 Comment

use JSON.parse for the reverse, from string into a proper object

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.