jsr367-experts@jsonb-spec.java.net

[jsr367-experts] Re: [jsonb-spec users] Re: [1-RuntimeAPI] Proposal

From: Hendrik Dev <hendrikdev22_at_gmail.com>
Date: Tue, 24 Feb 2015 16:19:34 +0100

Hi Martin,

On Mon, Feb 23, 2015 at 4:53 PM, Martin Grebac <martin.grebac_at_oracle.com> wrote:
>
> Hi Hendrik,
> sorry for my delay, have been on vacation last week. Please see my comments
> below.
>
> On 19.02.15 22:42, Hendrik Dev wrote:
>>
>> Hi Martin, Hi Experts,
>>
>> sorry for delay, here are my comments and patches:
>>
>> 1) Do we really need a JSONB_FROMJSON_ENCODING and if yes whats the
>> default? According to RFC 4627 JSON is must always be Unicode and the
>> encosing can therefore be always be detected by the algo described in
>> chapter 3.
>
> Don't have a strong opinion on this one, Ithink removing it should be fine.I
> will remove it unless there are different opinions.
>
>> 2) Jsonb.java: Do we also want to add java.nio andy byte[] support here?
>
> What kind of nio do you have in mind and what would be the expectation?

java.nio.file.Path
java.nio.channels.ByteChannel
java.nio.ByteBuffer
java.nio.CharBuffer

but i guess thats more relevant for JSR 353/374 than here cause we
leverage jsonp for that (i think)
sorry for the noise

>
> Is byte[] really that useful? We already have number of io methods in and I
> don't see much benefit in providing byte[]as well.

same as above

>
>> 3) Jsonb.java: Suggest to change Class<T> to Type for the fromJson()
>> methods to support generic types. (JSONB_SPEC-30)
>
> Don't agree here, but let's discuss generics in a separate topic. We'll be
> opening a discussion thread on this likely this week.
>
>> 5) Interface approach: Id like to see interfaces (over classes) since
>> implementations have to also "implement" the spec jars (depending on
>> licesing stuff), so its not helpful here to try to solve things in the
>> spec jars once and forever. It makes it even harder because if to much
>> code and classes are in the spec the distinction between spec and impl
>> will get vague and spec gets bloated (if you're looking for a good
>> example see javamail/JSR-919).
>
> I agree, though to clarify - interfaces (or better signatures - no matter
> whether they are classes or interfaces), javadoc and spec document all form
> an api. All else is an implementation.
>
>> 6) Patches: https://github.com/salyh/spec/commits/salyh_fixes1 (or
>> maybe better attach it to the mail as .diff?)
>
> Thanks - will look into this and reply separately.
>
>> BTW: Do i have missed the round of introductions?
>
> No, this piece somehow slipped from my kick off email, and nobody asked so I
> did not push for it afterwards :) . I did setup
> https://java.net/projects/jsonb-spec/pages/EGTransparency
>
> So everybody please put details which you'd like to share there, or send me
> your info and I can edit the page for you.Thanks!
>
> MartiNG
>



-- 
Hendrik Saly (salyh, hendrikdev22)
@hendrikdev22
PGP: 0x22D7F6EC