def x = 12
def y = 5
def m = [val: "$x:$y"]
JsonObject json = new JsonObject(m)
println jsonresults in{"val":{"values":[12,5],"strings":["",":",""],"bytes":"MTI6NQ==","valueCount":2}}instead of expected{"val":"12:5"}
I'm using Vertx version 3.2.1In Vertx 2 this issue was solved 2014 with https://github.com/vert-x/mod-lang-groovy/issues/59.Is it planned to solve this Issue in Vertx 3 with own version of groovish JsonObject? Or what are the best practice with groovy maps (which may contain lazy interpeted values) and JsonObject in vertx?Best regards,Nikolai
Json.mapper.registerModule(new SimpleModule().addSerializer(GString.class, new StdSerializer<GString>(GString.class) {
@Override
void serialize(GString value, JsonGenerator gen, SerializerProvider provider) throws IOException {
gen.writeString(value.toString());
}
}));
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/da30157b-466e-4693-983f-b363a3dc9478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/797819e6-285d-42a2-9e4b-06a24fa330dc%40googlegroups.com.