<jupyter_start><jupyter_text>JSONVer slides 36 até 40. BásicoCodificando objetos básicos do Python<jupyter_code>import simplejson as json
json_string = '{"pnome": "Dino", "unome":"Magri"}'
arq_json = json.loads(json_string)
print(arq_json['pnome'])
json_lista = ['foo', {'bar': ('baz', None, 1.0, 2)}]
print(json.dumps(json_lista))
json_dic = {"c": 0, "b": 0, "a": 0}
print(json.dumps(json_dic, sort_keys=True))<jupyter_output>{"a": 0, "b": 0, "c": 0}<jupyter_text>Imprimindo com os espaços para melhor visualização<jupyter_code>print(json.dumps(json_dic, sort_keys=True, indent=4 * ' '))<jupyter_output>{
    "a": 0,
    "b": 0,
    "c": 0
}
{'fraction_non_alphanumeric': 0.19314641744548286, 'fraction_numerical': 0.0264797507788162, 'mean_word_length': 6.841463414634147, 'pattern_counts': {'":': 11, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '539141', 'license': 'MIT', 'n_tokens_mistral': 296, 'n_tokens_neox': 281, 'n_words': 57, 'path': 'Python/2016-08-01/aula5-parte3-json.ipynb', 'repo_name': 'rubensfernando/mba-analytics-big-data', 'size': '642'}