Flex : how to pretty print JSON.stringify?
Asked Answered
T

1

5

I'm using the built in JSON package with Flex 4.6, how do you get it to nicely format the output, e.g. indent with 4 spaces, put each object on a new line etc.?

Teatime answered 21/10, 2012 at 1:51 Comment(1)
I don't understand what output you are trying to format.Photopia
E
21

The last param is used to insert spaces:

JSON.stringify(object, null, 4);
Eccentricity answered 21/10, 2012 at 2:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.