Skip to Content
Menu

Smile ParseJson

by
Odoo
v 18.0 Third Party 20
Download for v 18.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 20
Technical Name smile_parsejson
LicenseLGPL-3
Versions 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 20
Technical Name smile_parsejson
LicenseLGPL-3
Versions 17.0 18.0

License: AGPL-3 Smile-SA/odoo_addons

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:

  1. Inherit the `parse_json.mixin` class in your custom model.
  2. Store the JSON data in the `json_element` field.
  3. 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.

Smile SA

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.