blueloveTH 2 gadi atpakaļ
vecāks
revīzija
b9ad9f18c2
1 mainītis faili ar 6 papildinājumiem un 3 dzēšanām
  1. 6 3
      docs/modules/json.md

+ 6 - 3
docs/modules/json.md

@@ -3,14 +3,17 @@ icon: package
 label: json
 label: json
 ---
 ---
 
 
+pkpy has two JSON modules.
+1. The built-in JSON module is always available and can be imported via `import json`.
+2. After `v1.2.7`, you can set `PK_USE_CJSON` to `ON` in CMakeLists.txt to enable an alternative JSON module `cjson`.
+
+Their interfaces are the same, `cjson` is faster while the built-in `json` is more stable since it was developed earlier.
+
 ### `json.loads(s)`
 ### `json.loads(s)`
 
 
 Decode a JSON string into a python object.
 Decode a JSON string into a python object.
 
 
-It is supported by the `eval()` function.
-
 ### `json.dumps(obj)`
 ### `json.dumps(obj)`
 
 
 Encode a python object into a JSON string.
 Encode a python object into a JSON string.
 
 
-It is supported by the compiler with `JSON_MODE` enabled.