From 316be2a33e788803add3712c68b699926adcd882 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 9 Oct 2026 18:08:54 +0200 Subject: [PATCH] Document that editable documents refuse invalid UTF-8 copied from a loaded image Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/api/basic_json_document/load.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/mkdocs/docs/api/basic_json_document/load.md b/docs/mkdocs/docs/api/basic_json_document/load.md index 85b191155..5308bf1a2 100644 --- a/docs/mkdocs/docs/api/basic_json_document/load.md +++ b/docs/mkdocs/docs/api/basic_json_document/load.md @@ -140,6 +140,9 @@ so those stay safe on a damaged one. It does *not* guarantee that the image desc that a `full` check would have rejected can make [`dump()`](../basic_json_view/dump.md) write invalid UTF-8 or invalid JSON, or throw `type_error.316`, and a number can read back with a value that does not match how it is spelled. Reserve `bounds` for images you already trust to be well-formed, and use it only to skip the extra scan. +An [editable document](../json_editable_document.md) does not take such a string over either: +[`set`](set.md), [`push_back`](push_back.md) and [`insert`](insert.md) throw `type_error.316` when they copy it from +a view of the loaded document, and leave the editable document unchanged. ## Examples