@simoncropp In Verify is there a way to force the extension of the files to be `.json` instead of `.txt` so I get syntax highlighting in the diff viewers? #dotnet #VerifyTests
@bitbonk @simoncropp I think if you use the setting of UseStrictJson it'll write .json files
@romanx @simoncropp I think this setting may only apply when verifying objects. The above example verifies a JSON string.
@bitbonk @romanx for a json string. use VerifyJson

@bitbonk @romanx yeah i have a bug that is causing UseStrictJson to not apply to VerifyJson.

fix coming soon

@bitbonk @romanx actually no. my mistake. it does seem to work. if u do

[ModuleInitializer]
public static void Init() =>
VerifierSettings.UseStrictJson();

then VerifyJson should produce a json result with the correct extension

@simoncropp @romanx So the bug is that `VerifyJson(jsonString).UseStrictJson()` doesn’t work? I have to apply `.UseStrictJson()` globally in the module initializer?
(Can’t test it right now.)
@bitbonk @romanx can u push a stand alone repro to github?
@simoncropp @romanx I will, on Monday.

@simoncropp @romanx Here is the standalone minimal repo that reproduces the issue:

https://github.com/bitbonk/VerifyStrictJsonRepro

GitHub - bitbonk/VerifyStrictJsonRepro

Contribute to bitbonk/VerifyStrictJsonRepro development by creating an account on GitHub.

GitHub
@bitbonk @romanx thanks. the repro is legit. leave it with me
@bitbonk @romanx can u try 25.2.0
@simoncropp @romanx 25.2.0 behaves correctly now 🙏🏻