Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 20 |
Technical Name |
smile_parsejson |
License | LGPL-3 |
Versions | 17.0 18.0 |
Smile Parse JSON
This module provides a mixin class to simplify JSON parsing in Odoo models. It allows developers to extract nested JSON elements dynamically and handle complex JSON structures with ease.
Table of contents
Usage
To use this module, follow these steps:
- Inherit the `parse_json.mixin` class in your custom model.
- Store the JSON data in the `json_element` field.
- Use the `json_get` method to extract values from the JSON structure by providing a list of keys or properties.
Example:
{ "property": { "HS_AFI_H_4864843": { "name": "Regency Hotel Miami" } } }
Calling `json_get(['property', '_first_child', 'name'])` will return `"Regency Hotel Miami"`.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback here.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
- Smile SA Development Team
Maintainer
This module is maintained by Smile SA.
Since 1991 Smile has been a pioneer of technology and also the European expert in open source solutions.
Please log in to comment on this module