On Tue, 1 May 2018 16:05:18 -0500
"Edward K. Ream" <edream...@gmail.com> wrote:

> ​Sounds reasonable.  I wonder, is there any plausible situation in
> which a ​uA wouldn't be json serializable?
> 
> Anyone have thoughts about this?

Well, every time a user's placed a non-JSON-serializable key or value
in uA.

import datetime
import json
json.dumps({'a': 1})    # valid
json.dumps({1: 1})      # works, but changes type of key
json.dumps({1.2: 1})    # works, but changes type of key
json.dumps({(1,1): 1})  # TypeError, never happens?
json.dumps({'a': datetime.datetime(2015, 1, 1, 3)})  # TypeError
json.dumps({'a': set((1, 2))})  # TypeError

I'll try and scan my .leo files and see how many real world problems
there are.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to