From c0c8c341ff9d00086517b00cd6a1547ef390cb9b Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2026 10:35:38 +0100 Subject: api: types are sticky --- src/document/typed.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/document/typed.rs') diff --git a/src/document/typed.rs b/src/document/typed.rs index a542578..cf7f49b 100644 --- a/src/document/typed.rs +++ b/src/document/typed.rs @@ -519,25 +519,4 @@ impl Val { Val::Scalar(scalar) => Kind::of(scalar), } } - - /// In JSON of `form`. - pub(crate) fn to_json(&self, form: JsonForm) -> Option { - Some(match self { - Val::Map(entries) => map_to_json( - entries - .iter() - .map(|(key, value)| Some((key.clone(), value.to_json(form)?))) - .collect::>()?, - form, - ), - Val::List(items) => JsonValue::Array( - items - .iter() - .map(|item| item.to_json(form)) - .collect::>()?, - ), - Val::Text(text) => text_to_json(text.clone(), form), - Val::Scalar(scalar) => scalar_to_json(scalar, form)?, - }) - } } -- cgit v1.3.1