8000 NotImplementedError: parse_raw is not supported for pydantic 2 - how to do it with Pydantic 2? · Issue #228 · eyurtsev/kor · GitHub
[go: up one dir, main page]

Skip to content

NotImplementedError: parse_raw is not supported for pydantic 2 - how to do it with Pydantic 2? #228

@ChristianWeyer

Description

@ChristianWeyer

Hi!

based on this:
https://eyurtsev.github.io/kor/schema_serialization.html#deserialization

I am trying to deserialize from a JSON schema into an Object like this:

with open("schema.json", "r") as f:
    schema = Object.parse_raw(f.read())

Here, I get an error:

python3.11/site-packages/kor/nodes.py", line 280, in parse_raw
    raise NotImplementedError(
NotImplementedError: parse_raw is not supported for pydantic 2

What would be the way to do this with Pydantic 2?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0