nrktkt/ninny-json

Type members for optional/concrete and JsonValue type for ToJson

nrktkt opened this issue · 0 comments

Currently ToSomeJson <: ToJson and mostly the JSON type output of ToJsonValue is thrown away when aliasing to ToJson. Can we make the JSON output type and Option/Id as type members of a reworked top level ToJson so that users can write type annotations like val toJsonA: ToJson[A] while still getting specific output types like val aJson: JsonNumber = a.toJson?

this is a generalization of #46