users@jsonb-spec.java.net

[jsonb-spec users] [jsr367-experts] Re: simple value supported?

From: Dmitry Kornilov <dmitry.kornilov_at_oracle.com>
Date: Mon, 7 Dec 2015 22:32:51 +0100

I don’t remember the discussion, but simple values are supported. There are some samples in DefaultMapping.java.

Dmitry

> On 07 Dec 2015, at 19:02, Romain Manni-Bucau <rmannibucau_at_tomitribe.com> wrote:
>
> Hi guys,
>
> didn't find in the archive if we discussed if we should support simple values.
>
> Here few samples:
>
> assertEquals("\"strValue\"", JSONB.toJson(Optional.of("strValue")));
> assertEquals("null", JSONB.toJson(Optional.ofNullable(null)));
> assertEquals("null", JSONB.toJson(Optional.empty()));
> assertEquals("1", JSONB.toJson("1"));
>
> I think not JsonObject and JsonArray values shouldn't be supported but
> I know several mapper can support it.
>
> If it has been discussed happy to catch up with an archive link, if
> not what do you think?
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau