scala> "a" := "b"
res0: (String, argonaut.Json) = (a,"b")
scala> ("a" := "b") ->: jEmptyObject
res2: argonaut.Json = {"a":"b"} scala> ("a" := ("b" := "c")) ->: jEmptyObject
res3: argonaut.Json = {"a":["b","c"]} scala> ("a" := ("b" := "c") ->: jEmptyObject) ->: jEmptyObject
res4: argonaut.Json = {"a":{"b":"c"}}And I probably would have figured it out pretty quickly if I hadn't been confused by receiving an array instead.
The very slight syntactic differences between the two very different json outputs doesn't feel intentional and was confusing for me.
Regardless, this was a hiccup, thanks again for a really interesting library that I'm enjoying getting to grips with.
c
val aValue =("b" := "c") ->:jEmptyObject
(a := aValue) ->: jEmptyObjectscala> def foo:Json = ("a" := "b") ->: jEmptyObjectfoo: argonaut.Jsonscala> def foo3 = JsonObject.from(List(("a", jString("b")), ("c", jString("d"))))foo3: argonaut.JsonObject