You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by Mark Struberg <st...@yahoo.de.INVALID> on 2017/02/21 09:43:49 UTC

Expected JsonObjectBuilder#build() behaviour

Hi folks!

Anybody knows if calling build() on a JsonObjectBuilder should reset the builder as per the spec?
Or asked in other words: are JsonObjectBuilder instances meant to be reusable?

txs and LieGrue,
strub

Re: Expected JsonObjectBuilder#build() behaviour

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
I created https://java.net/jira/browse/JSON_PROCESSING_SPEC-84

LieGrue,
strub


> Am 21.02.2017 um 11:19 schrieb Mark Struberg <st...@yahoo.de.INVALID>:
> 
> Oki gonna create a spec clarification ticket.
> 
> txs and LieGrue,
> strub
> 
> 
>> Am 21.02.2017 um 10:47 schrieb Romain Manni-Bucau <rm...@gmail.com>:
>> 
>> Hi Mark,
>> 
>> don't think it is in the spec - didnt see it at least - but shouldn't be
>> reusable IMO (you could only reuse the exact same value which would lead to
>> use the same JsonObject and not builder). Not being reusable at least
>> allows to make that obvious and avoid the ambiguity to override a value
>> which wouldnt work anyway
>> 
>> 
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://blog-rmannibucau.rhcloud.com> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
>> <https://javaeefactory-rmannibucau.rhcloud.com>
>> 
>> 2017-02-21 10:43 GMT+01:00 Mark Struberg <st...@yahoo.de.invalid>:
>> 
>>> Hi folks!
>>> 
>>> Anybody knows if calling build() on a JsonObjectBuilder should reset the
>>> builder as per the spec?
>>> Or asked in other words: are JsonObjectBuilder instances meant to be
>>> reusable?
>>> 
>>> txs and LieGrue,
>>> strub
> 


Re: Expected JsonObjectBuilder#build() behaviour

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
Oki gonna create a spec clarification ticket.

txs and LieGrue,
strub


> Am 21.02.2017 um 10:47 schrieb Romain Manni-Bucau <rm...@gmail.com>:
> 
> Hi Mark,
> 
> don't think it is in the spec - didnt see it at least - but shouldn't be
> reusable IMO (you could only reuse the exact same value which would lead to
> use the same JsonObject and not builder). Not being reusable at least
> allows to make that obvious and avoid the ambiguity to override a value
> which wouldnt work anyway
> 
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
> 
> 2017-02-21 10:43 GMT+01:00 Mark Struberg <st...@yahoo.de.invalid>:
> 
>> Hi folks!
>> 
>> Anybody knows if calling build() on a JsonObjectBuilder should reset the
>> builder as per the spec?
>> Or asked in other words: are JsonObjectBuilder instances meant to be
>> reusable?
>> 
>> txs and LieGrue,
>> strub


Re: Expected JsonObjectBuilder#build() behaviour

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Mark,

don't think it is in the spec - didnt see it at least - but shouldn't be
reusable IMO (you could only reuse the exact same value which would lead to
use the same JsonObject and not builder). Not being reusable at least
allows to make that obvious and avoid the ambiguity to override a value
which wouldnt work anyway


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-21 10:43 GMT+01:00 Mark Struberg <st...@yahoo.de.invalid>:

> Hi folks!
>
> Anybody knows if calling build() on a JsonObjectBuilder should reset the
> builder as per the spec?
> Or asked in other words: are JsonObjectBuilder instances meant to be
> reusable?
>
> txs and LieGrue,
> strub