DotNetLightning icon indicating copy to clipboard operation
DotNetLightning copied to clipboard

TODO: add testcase from BOLT07 for extended-queries.json

Open joemphilips opened this issue 5 years ago • 7 comments

I've just realized that BOLT has json file of testcase for extended queries here

Right now, it only has property tests. It will be good starting point if someone wants to start understanding this library and F# / Expecto / System.Text.Json in general. Imitating TLVSerialize.fs might be good way to get done.

joemphilips avatar Mar 01 '20 07:03 joemphilips

Why System.Text.Json instead of Newtonsoft.Json?

knocte avatar Mar 01 '20 13:03 knocte

Just for the sake of consistency and performance. It is fine to use Newtonsoft as well.

joemphilips avatar Mar 01 '20 14:03 joemphilips

Consistency with what? WRT the latter: IMO correctness is better.

knocte avatar Mar 01 '20 16:03 knocte

Consistancy with other part of the test code. Correctness does not change by witch json library we use.

joemphilips avatar Mar 02 '20 01:03 joemphilips

Consistency with other part of the test code.

This made me realise I was misunderstanding our conversation. It turns out the first time I read this issue I misread "System.Text.Json" as "ServiceStack.Json" (https://www.nuget.org/packages/ServiceStack.Text/). Now it's all clear.

Correctness does not change by witch json library we use.

You would be surprised! I was actually raising this because I know cases of differing behaviour between ServiceStack.Json and Newtonsoft.Json (that would make you understand why the former is actually faster).

knocte avatar Mar 02 '20 05:03 knocte

I know cases of differing behaviour between ServiceStack.Json and Newtonsoft.Json

One example (and this is just one of them): https://stackoverflow.com/questions/11882987/why-servicestack-text-doesnt-default-dates-to-iso8601

knocte avatar Mar 02 '20 05:03 knocte

Interesting. Well, in this case it is just for reading json from flat file so I don't think it is a big deal. But I got your point.

joemphilips avatar Mar 02 '20 07:03 joemphilips