python:jsonprocessing
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
python:jsonprocessing [2016/08/03 08:54] – created admin | python:jsonprocessing [2022/10/29 16:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Python Json ====== | ====== Python Json ====== | ||
+ | refer: http:// | ||
===== Simple Example ===== | ===== Simple Example ===== | ||
+ | ==== Parse Json String (Json Decoder)==== | ||
+ | * Performs the following translations in **decoding** by default: | ||
+ | |||
+ | ^JSON^Python^ | ||
+ | |object|dict| | ||
+ | |array|list| | ||
+ | |string|unicode| | ||
+ | |number (int)|int, long| | ||
+ | |number (real)|float| | ||
+ | |true|True| | ||
+ | |false|False| | ||
+ | |null|None| | ||
+ | |||
* Simple example for parsing Json:< | * Simple example for parsing Json:< | ||
import json | import json | ||
Line 11: | Line 25: | ||
print parsed_json[' | print parsed_json[' | ||
</ | </ | ||
+ | ==== Create Json String(Json Encoder) ==== | ||
+ | * Supports the following objects and types by default: | ||
+ | |||
+ | ^Python^JSON^ | ||
+ | |dict|object| | ||
+ | |list, tuple|array| | ||
+ | |str, unicode|string| | ||
+ | |int, long, float|number| | ||
+ | |True|true| | ||
+ | |False|false| | ||
+ | |None|null| | ||
+ | |||
+ | * Simple Example | ||
===== Json to csv ===== | ===== Json to csv ===== |
python/jsonprocessing.1470214472.txt.gz · Last modified: 2022/10/29 16:15 (external edit)