json-as 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assembly/__tests__/as-json.spec.ts +1 -1
- package/assembly/json.ts +2 -2
- package/assembly/test.ts +0 -1
- package/assembly/type.ts +3 -0
- package/package.json +2 -1
- package/transform/package.json +1 -1
package/assembly/json.ts
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
tCode,
|
|
19
19
|
uCode,
|
|
20
20
|
} from "./chars";
|
|
21
|
-
import {
|
|
21
|
+
import { unsafeCharCodeAt } from "./util";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* JSON Encoder/Decoder for AssemblyScript
|
|
@@ -299,7 +299,7 @@ export class JSON {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
// @ts-ignore
|
|
302
|
-
const deserialized = schema
|
|
302
|
+
const deserialized = changetype<nonnull<T>>(schema).__JSON_Deserialize<T>(result)
|
|
303
303
|
heap.free(changetype<usize>(schema));
|
|
304
304
|
return deserialized;
|
|
305
305
|
}
|
package/assembly/test.ts
CHANGED
package/assembly/type.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-as",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "JSON encoder/decoder for AssemblyScript",
|
|
5
5
|
"types": "assembly/index.ts",
|
|
6
6
|
"author": "Jairus Tanaka",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@serial-as/json": "^2.0.0",
|
|
26
26
|
"assemblyscript": "^0.20.7",
|
|
27
27
|
"assemblyscript-prettier": "^1.0.2",
|
|
28
|
+
"prettier": "^2.7.1",
|
|
28
29
|
"typescript": "^4.7.2"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|