sqlite.py
· 283 B · Python
Raw
# SQLITE sait interroger une donnée en json.
# si le champ est un champ text qui contient du json, on peut directement requeté sur le champ =)
# et on peut aussi reformater un champ date
json = json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$')
print(json)
# {"a":2,"c":[4,5,{"f":7}]}
| 1 | # SQLITE sait interroger une donnée en json. |
| 2 | # si le champ est un champ text qui contient du json, on peut directement requeté sur le champ =) |
| 3 | # et on peut aussi reformater un champ date |
| 4 | |
| 5 | json = json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$') |
| 6 | print(json) |
| 7 | # {"a":2,"c":[4,5,{"f":7}]} |