OpenHFT / Chronicle-Wire

A Low Garbage Java Serialisation Library that supports multiple formats
http://chronicle.software
Apache License 2.0
506 stars 123 forks source link

JsonWire doesn't support typeLiterals #738

Closed maxim-ponomarev closed 8 months ago

maxim-ponomarev commented 11 months ago

!type declaration is not supported in JsonWire see pull request https://github.com/OpenHFT/Chronicle-Wire/pull/795

RobAustin commented 9 months ago

should its show this "{\"implClass\":!type net.openhft.chronicle.wire.JSONWireTest}",

yevgenp commented 9 months ago

should its show this "{"implClass":!type net.openhft.chronicle.wire.JSONWireTest}",

That's not a valid JSON. Though my PR is still WiP. I can't get an expected output from @peter-lawrey for all the tests above.

RobAustin commented 9 months ago

I spoke with maxim today and ( I think ) he said this would be the best format for the UI:

{
  "@net.openhft.chronicle.wire.JSONWireTest$DtoWithClassReference": {
    "implClass": {
      "@type": "net.openhft.chronicle.wire.JSONWireTest"
    },
    "bool": "false"
  }
}
RobAustin commented 9 months ago

@maxim-ponomarev told me that it was blocking him, so Ive put together a PR for review, https://github.com/OpenHFT/Chronicle-Wire/pull/795

RobAustin commented 9 months ago

@maxim-ponomarev and @yevgenp please just go ahead and alter the PR if you feel there should be changes to it.

RobAustin commented 9 months ago

@Yevgen - please re-review

hft-team-city commented 7 months ago

Released in Chronicle-Wire-2.25ea5, BOM-2.25ea23