[Python-ideas] Extension of python/json syntax to support explicitly sets and ordered dict.

Matteo Nastasi nastasi at alternativeoutput.it
Thu Sep 7 07:36:31 EDT 2017


Hi all,

few days ago I thought about a way to rapresent sets and
ordered dicts using a json compatible syntax, these are my conclusions:

A set could be defined as { item1, item2, item3[...] }
    with {,} as an empty set

An ordered dict could be defined as [ item1: value1, item2: value2 ... ]
    with [:] ase an empty odered dict

It could be used inside python code or to serialize python structures in
a json-like format (pyson maybe ?).

What do you think about ?

  Kind regards, Matteo.

-- 
  email:   nastasi at alternativeoutput.it,   matteo.nastasi at gmail.com
  web:   www.alternativeoutput.it   irc: #linux-mi at irc.freenode.net
                 linkedin: http://lnkd.in/SPQG87


More information about the Python-ideas mailing list