Separate FuzzyMaps for each actor. Close #110
This commit is contained in:
@@ -16,5 +16,7 @@ typedef Jsonable<T> = {
|
||||
function parse(s:String):T;
|
||||
}
|
||||
|
||||
typedef JsonStringMap = JsonMap<JsonableString>;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class JsonMap<T:Jsonable<T>> {}
|
||||
|
8
src/kiss_tools/JsonableString.hx
Normal file
8
src/kiss_tools/JsonableString.hx
Normal file
@@ -0,0 +1,8 @@
|
||||
package kiss_tools;
|
||||
|
||||
import kiss.Prelude;
|
||||
import kiss.List;
|
||||
import haxe.Json;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class JsonableString {}
|
7
src/kiss_tools/JsonableString.kiss
Normal file
7
src/kiss_tools/JsonableString.kiss
Normal file
@@ -0,0 +1,7 @@
|
||||
(defNew [&prop :String value])
|
||||
|
||||
(method parse [:String representation]
|
||||
(new JsonableString (Json.parse representation)))
|
||||
|
||||
(method stringify []
|
||||
(Json.stringify value))
|
Reference in New Issue
Block a user