To ReproduceToJson and SaveToJsonStream allow passing optional JsonSerializerSettings.
LoadFromJson and LoadFromJsonStream do not allow passing an optional JsonSerializerSettings.
Expected behavior
In the above scenario it's possible to serialize an index in a way that is not reversible when loading the same index later. In addition there are no unit tests for ToJson with the accompanying options, so it's unclear whether the correct intention is not to have options, or to have options for both sets of methods.
It seems that it might be easier to remove the options to ensure the index is compliant with lunr-js, but I'm not sure, and so haven't added a pull request.
To Reproduce
ToJson
andSaveToJsonStream
allow passing optionalJsonSerializerSettings
.LoadFromJson
andLoadFromJsonStream
do not allow passing an optionalJsonSerializerSettings
.Expected behavior In the above scenario it's possible to serialize an index in a way that is not reversible when loading the same index later. In addition there are no unit tests for
ToJson
with the accompanying options, so it's unclear whether the correct intention is not to have options, or to have options for both sets of methods.It seems that it might be easier to remove the options to ensure the index is compliant with lunr-js, but I'm not sure, and so haven't added a pull request.