Thursday 17 October 2019

Will the generic TObjectList bug with serialising to JSON get fixed?

When I try to serialise a generic TObjectList to JSON doing something like this:

Response.Content  := TJSON.ObjectToJsonString(MyObjectList);

I get the error Type tkPointer is not currently supported. I am using 10.3 and I believe this bug (21685) has been around since XE8. I am currently having to think of workarounds and trying to find the best solution. It would be really useful if they would fix this bug, or give some idea of when it will be fixed, does anyone know?

3 comments:

  1. Maybe but then something else will be broken. And when that is fixed some internal refactoring will break it yet again.

    Just don't use REST.Json - that stuff is junk.

    ReplyDelete
    Replies
    1. Thanks for your feedback Stefan, what would you suggest instead of REST.Json?

      Delete
  2. I made my own IJSONDocArray to fix problems like these in https://github.com/stijnsanders/jsonDoc

    ReplyDelete