Fix constructor of struct
Rewrite endObject function to no use json_reader_end_member().