Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. JSON Char Display v 16.0
  4. Sales Conditions FAQ

JSON Char Display

by Lucas https://github.com/Lucas-l16
Odoo
v 16.0 Third Party 1
Download for v 16.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 499
Technical Name json_char_display
LicenseLGPL-3
Websitehttps://github.com/Lucas-l16
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 499
Technical Name json_char_display
LicenseLGPL-3
Websitehttps://github.com/Lucas-l16
Odoo 16 Technical

JSON Char Display

A dedicated field widget for JSON strings stored in Char and Text fields. Displays data in a structured, indented format for better readability and easier debugging.

Read-only card view Formatting editor List view preview No backend dependency

Key Features

Ready to use out of the box — enable human-readable JSON display with a single line of XML

Read-only formatted display

Valid JSON is shown in a Bootstrap card with monospace indentation. Invalid JSON is displayed with a warning while preserving the raw value — no data is lost.

Edit toolbar

Edit mode provides Format, Minify, and Validate actions for quick pretty-printing, compression, and syntax checking.

One-click copy

Copy formatted JSON directly in read-only mode, ready to paste into external tools or documentation.

List view preview

Shows a {...} badge and a summary of top-level keys in list views, so you can identify JSON content without opening the form.

Smart dirty-state handling

Opening a form only applies display-layer formatting and does not mark the record as modified. The record is marked dirty only when the JSON content changes semantically.

Lightweight integration

Depends only on the web module. Pure frontend OWL field widget — no Python model changes required; declare it in your view XML and you are done.

Configurable options

Customize indent size, read-only area max height, and whether to auto-format when entering edit mode.

Feature Screenshots

See how the widget presents valid and invalid JSON across Odoo views and field states

List view display

JSON values are summarized directly in list views, making records easier to scan without opening each form.

JSON Char Display widget in Odoo list view
Valid JSON in form view

Well-formed JSON is shown with clear indentation and readable structure while editing records.

Valid JSON rendered in Odoo form view
Invalid JSON in form view

Invalid JSON remains visible with a clear warning, so users can diagnose syntax issues without losing the raw value.

Invalid JSON warning in Odoo form view
Read-only field with valid JSON

Read-only fields keep valid JSON easy to inspect with formatted output and a clean display area.

Valid JSON displayed in a read-only Odoo form field
Read-only field with invalid JSON

Read-only invalid values are preserved and flagged, helping users understand data quality issues at a glance.

Invalid JSON displayed in a read-only Odoo form field

How to Use

Get started in three steps

1Install the module

Search for and install JSON Char Display from Apps, or install from the command line:

python odoo-bin -d <database> -i json_char_display
2Declare the widget

Add widget="json_char" to a Char or Text field in your form or list view:

<field name="payload" widget="json_char"/>
3Upgrade the module

After editing your view XML, upgrade the module and refresh your browser:

python odoo-bin -d <database> -u json_char_display

XML Examples

Typical usage in form and list views

Form view
<form>
    <sheet>
        <group>
            <field name="name"/>
        </group>
        <group string="API Response">
            <field name="payload"
                   widget="json_char"/>
        </group>
    </sheet>
</form>
List view
<tree>
    <field name="name"/>
    <field name="payload" widget="json_char"/>
</tree>
With options
<field name="payload"
       widget="json_char"
       options="{
           'indent': 2,
           'auto_format_on_edit': true,
           'max_height': 400
       }"/>

Configuration Options

Fine-tune widget behavior via the options attribute

Option Type Default Description
indent Integer 2 Number of spaces used when pretty-printing JSON
auto_format_on_edit Boolean true Whether to show formatted JSON in the textarea when entering edit mode (display only — not saved to the database)
max_height Integer 400 Maximum height of the JSON display area in read-only mode (pixels); a scrollbar appears when content exceeds this height

Use Cases

API response storage

Raw JSON strings returned by third-party APIs

Debugging & troubleshooting

Quickly inspect configuration or log JSON during development

Integration settings

JSON configuration fields for webhooks, sync rules, and more

Legacy data compatibility

Existing Char/Text fields storing JSON — no field type migration required

Built-in Demo

The module includes a JSON Char Demo menu and sample records. After installation, you can try read-only display, the edit toolbar, and list view preview right away.

Note: remove the json.char.demo model and related demo data before deploying to production.

  • Nested object JSON sample
  • JSON array sample
  • Invalid JSON graceful display sample

JSON Char Display

Widget: json_char  |  Field types: char, text  |  Depends on: web

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.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with