sbcgua / ajson

Yet another json parser serializer for ABAP
MIT License
52 stars 16 forks source link

zif_ajson #42

Closed sbcgua closed 3 years ago

sbcgua commented 3 years ago

to #39

constants, types moved to zif_ajson. All methods aliased from there as well.

@larshp @mbtools What do you think about it ? Imho looks a bit messy ... is there benefits to keep reader/writer ?

Any opinions ? :)

P.S. would I separate the interfaces if I designed the whole class initially (and not reader first, and the writer like it happened). I guess, not. Hmmm ...

larshp commented 3 years ago

I think lets just try it out 😄

sbcgua commented 3 years ago

OK, will keep it till tomorrow and merge, unless no more comments. But I feel a strong desire to remove reader/writer IFs in future

mbtools commented 3 years ago

I'm using ajson now in a few places and it's ok with separate interfaces. However, I find that I have to ask myself often if a lo_json is ref to read or write interface or ref to class - three possibilities. Sure, I can encode the type in the variable names. But I think it would be better to have it be part of the object (a property like the freezing). While a reader-only makes sense, you might have to read a writer-object too. I vote for combining but don't mind if it stays as is.

sbcgua commented 3 years ago

yeap ... ok ... so, currently there are tons of aliases allowing to call methods from object itself and from zif_ajson ... let's merge then. I'm leaving the original IFs for a while. And I've put a warning into readme so that zif_ajson is kind of recommended way. Let's see how it goes. Will have to change some code in our products as well :)))

Thanks for comments !