Skip to content

load_json doesn't work on nested objects #1383

@dantownsend

Description

@dantownsend

Discussed in #1381

Originally posted by diklios5768 April 27, 2026

from piccolo.columns import ForeignKey, JSON
from piccolo.table import Table


class User(Table):
    info = JSON()


class Book(Table):
    user = ForeignKey(references=User)
    info = JSON()

when use:user= Book.objects(Book.user).output(load_json=True)

.output(load_json=True) only deserialise Book.info to dict, and User.info is stil str

Is this a designed feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions