bra...@hindu.org> wrote:

    "Actually if I just let the jsonExport and jsonImport do the work… it's 
valid json… except that what's on disk is all on a single line."

Python to the rescue: this works as a text filter in BBEdit 

save to:

~/Library/Application Support/BBEdit/Text Filters/

#!/usr/bin/env python
import fileinput
import json
if __name__ == "__main__":
  jsonStr = ''
  for a_line in fileinput.input():
    jsonStr = jsonStr + ' ' + a_line.strip()
  jsonObj = json.loads(jsonStr)
  print json.dumps(jsonObj, sort_keys=True, indent=2)

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to