From 56e379108adfb6dd9241be76bf695afb0b2360fa Mon Sep 17 00:00:00 2001 From: daninus14 Date: Tue, 16 Jun 2026 11:51:17 +0300 Subject: [PATCH] Update README.md's Type Mappings Adding context to the type mappings for clarity. See https://github.com/Zulu-Inuoe/jzon/issues/94 --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4ea12c6..f0436b7 100644 --- a/README.md +++ b/README.md @@ -113,19 +113,21 @@ If you have an up to date version of `uiop` installed: ### Type Mappings -jzon cannonically maps types per the following chart: - -| JSON | CL | -|--------|-------------------------| -| true | symbol `t` | -| false | symbol `nil` | -| null | symbol `null` | -| number | integer or double-float | -| string | simple-string | -| array | simple-vector | -| object | hash-table (equal) | - -**Note** the usage of symbol `cl:null` as a sentinel for JSON `null` +By default jzon maps types per the following chart: + +| JSON | CL | +|--------|------------------------------------------| +| true | symbol `t` | +| false | symbol `nil`Note 2 | +| null | symbol `null` | +| number | integer or double-float | +| string | simple-string | +| array | simple-vector | +| object | hash-table (equal) | + +**Note 1** the usage of symbol `cl:null` as a sentinel for JSON `null` + +**Note 2** In `standard-objects` aka CLOS classes `nil` will be serialized to `null` unless `:type boolean` is specified in the slot options for that slot. See https://github.com/Zulu-Inuoe/jzon#standard-object for details. When writing, additional values are supported. Please see the section [jzon:stringify](#jzonstringify).