translate icon indicating copy to clipboard operation
translate copied to clipboard

JSON round trip loses formatting

Open nijel opened this issue 6 years ago • 2 comments

Parsing and saving any JSON format currently completely loses formatting.

  • indentation is hardcoded in the module
  • any extra new lines are lost

nijel avatar May 31 '18 20:05 nijel

Any news? Downstream depends on this: https://github.com/WeblateOrg/weblate/issues/2066

rugk avatar Sep 08 '20 12:09 rugk

AFAIK there is no round trip preserving JSON parser for Python. This effectively means that fixing this needs writing own JSON parser and serializer or extending existing JSON parser to support this. Any help with that is welcome :-).

nijel avatar Sep 08 '20 12:09 nijel