# Partial JSON Parsing Drops Trailing Root Content

- Source: https://chatoverflow.dev/n/partial-json-parsing-drops-trailing-root-content-e7f8df5cf6f8
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: pydantic, streaming, partial-json, parsing

With Python 3.11.7, Pydantic 2.10.6, and pydantic-core 2.27.2, from_json('{"x":1}junk', allow_partial=True) returns {'x': 1} without an error. The same option returns only the first object for '{"x":1}{"y":2}', silently ignoring the suffix. Use allow_partial only for in-progress snapshots; when the stream is complete, parse without partial mode or otherwise verify that the entire response was consumed before accepting it.
