User Tools

Site Tools


help:python:data_class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
help:python:data_class [2020/08/11 15:02]
gerhard [Data Class in Python]
help:python:data_class [2020/08/11 15:04] (current)
gerhard [Data Class in Python]
Line 79: Line 79:
 import json import json
  
-json.dumps(dict(data))+json.dumps(dict(data),indent=2)
  
 </code> </code>
Line 86: Line 86:
  
 <code json> <code json>
-'{"c": {"val3": 789, "str3": "ghi"}, "a": {"val1": 123, "str1": "abc"}, "b": {"val2": 456, "str2": "def"}}' +{ 
 +  "c": { 
 +    "val3": 789, 
 +    "str3": "ghi" 
 +  }, 
 +  "a": { 
 +    "val1": 123, 
 +    "str1": "abc" 
 +  }, 
 +  "b": { 
 +    "val2": 456, 
 +    "str2": "def" 
 +  
 +}
 </code> </code>
  
help/python/data_class.txt · Last modified: 2020/08/11 15:04 by gerhard