From 0b93fa5d8187b774e023726aee10ed4b072eca79 Mon Sep 17 00:00:00 2001 From: Artyom Bologov Date: Mon, 18 Sep 2023 19:16:53 +0400 Subject: [PATCH] README: Update and clarify several ambiguous points. --- README.org | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index b76f6ca..b0f1509 100644 --- a/README.org +++ b/README.org @@ -99,18 +99,21 @@ more valuable. NJSON has strict requirements on the returned data, but this strictness enables a rich set of JSON-handling primitives/helpers. You can -- safely ~:use #:njson~ in your packages if you want short and convenient JSON - operations there; - -- or you can define a package local nickname for ~:njson/aliases~ to be - a mere ~j:~ (using ~trivial-package-local-nicknames~), so that even - shorter helpers (just a couple of characters longer than the regular - CL constructs) are available: +- ~(:use #:cl #:njson)~ in your packages if you want short and + convenient JSON operations there. It's safe, because NJSON shadows + no symbols from CL. + +- Or you can define a package local nickname for ~:njson/aliases~ to + be a mere ~j:~ (using ~trivial-package-local-nicknames~), so that + even shorter helpers (just a couple of characters longer than the + regular CL constructs) are available: #+begin_src lisp (trivial-package-local-nicknames:add-package-local-nickname :j :njson/aliases :YOUR-PACKAGE) ;; And then use it like. (j:get ...) (j:decode ...) + (j:if ...) + (j:match ...) #+end_src See the next section for the functions/macros NJSON exports. @@ -148,6 +151,8 @@ Note the pathname indexing—it uses the [[https://www.rfc-editor.org/rfc/rfc690 A stricter version of =jget= that throws =no-key= error when there's nothing under the given key in the provided object. +Will be merged into =jget= with the next major release. + ** FUNCTION njson:jcopy (alias: njson/aliases:copy) Copies the whole thing it's passed, no mater the nesting, into a fresh new equal object. Makes all the arrays adjustable and fillable for further possibly destructive use.