lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


If you want "pretty" JSON output that can still be parsed by a std
json parser, I may be able to add this as an encoding option for
luajson.  I'll have to see if your example has a good set of rules to
work off of.  Pretty-printing table-structure data can be
straightforward, but typically has one-off cases to handle certain
data scenarios:
 * 1 primitive-element array
 * very short object when nested deep
... etc


On 1/25/11, Alexander Gladysh <agladysh@gmail.com> wrote:
> Hi, all!
>
> Is there a way to pretty-print JSON output using luajson?
>
> I need to get something close to what `python -mjson.tool' prints.
>
> Thanks,
> Alexander.
>
>


-- 
Thomas Harning Jr.