Add JsonInt and JsonFloat

This commit is contained in:
2024-07-12 13:42:51 -06:00
parent d542dba8dd
commit d871516d3c
4 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package kiss_tools;
import kiss.Prelude;
import kiss.List;
@:build(kiss.Kiss.build())
class JsonFloat {}

View File

@@ -0,0 +1,4 @@
(defNew [&prop :Float value])
(method stringify [] "$value")
(method parse [:String data] (new JsonFloat (Std.parseFloat data)))

View File

@@ -0,0 +1,7 @@
package hollywoo;
import kiss.Prelude;
import kiss.List;
@:build(kiss.Kiss.build())
class JsonInt {}

View File

@@ -0,0 +1,4 @@
(defNew [&prop :Int value])
(method stringify [] "$value")
(method parse [:String data] (new JsonInt (Std.parseInt data)))