import JSON "mo:json/JSON";
import Debug "mo:base/Debug";
let obj : JSON.JSON = #Object([]);
Debug.print(JSON.show(obj));
// {}
Debug.print(JSON.show(#Object([("username", #String("di-wu"))])));
// {"username": "di-wu"}
Debug.print(JSON.show(#Object([
("name", #Object([
("firstName", #String("quint"))
])),
("username", #String("di-wu"))
])));
// {"name": {"firstName": "quint"}, "username": "di-wu"}
forked from aviate-labs/json.mo
-
Notifications
You must be signed in to change notification settings - Fork 0
JSON for Motoko
License
onehilltech/json.mo
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
JSON for Motoko
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Motoko 91.7%
- Dhall 5.7%
- Makefile 2.6%