sbcgua / ajson

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

move stringify() to ZIF_ABAPGIT_AJSON_WRITER ? #37

Closed larshp closed 3 years ago

larshp commented 3 years ago

the ZIF_ABAPGIT_AJSON_WRITER instance cannot be used to get the actual JSON right now?

larshp commented 3 years ago

have to do something like this, having the interface name part of the SET method call,

    lo_ajson = zcl_abapgit_ajson=>create_empty( ).
    lo_ajson->zif_abapgit_ajson_writer~set(
      iv_path = '/'
      iv_val = <lg_tab> ).
    lo_ajson->stringify( ).
larshp commented 3 years ago

either do complete separation of reading and writing, with some methods to easily convert?

or have just one interface?

sbcgua commented 3 years ago

Yeah, reader and writer separation look strange for me too. It is some kind of heritage ... i think for now it should be fine to move stringify to interface and make an alias to keep compatibility

sbcgua commented 3 years ago

moved stringinfy to writer. @larshp have a look. But really considering merging the interfaces for future - there is no clear benefit from 2 of them. reader/writer will stay for a while in any case

larshp commented 3 years ago

cool, do you want to keep this issue open, or a new for merging the two interfaces?

sbcgua commented 3 years ago

let's create a new one

sbcgua commented 3 years ago

opened #39