You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
I have verified that I am running the latest version of Nancy
I have verified if the problem exist in both DEBUG and RELEASE mode
I have searched open and closed issues to ensure it has not already been reported
Description
I'm not able to use Custom Primitive Converters (JavaScriptPrimitiveConverter) on types string, IEnumerable, numeric and boolean.
Why is it called JavaScriptPrimitiveConverter if we can't do it? I'm maybe just don't understand how it should work.
Funny thing is JavaScriptPrimitiveConverter seem to be used in the function jsonSerializerStrategy.TrySerializeNonPrimitiveObject in SimpleJson.cs
Environment (Operating system, version and so on): Windows 10 x86_64(dev), RaspberryPi arm 32bits(runtime)
.NET Framework version:
Additional information:
Code location hint: SerializeValue in SimpleJson.cs.
I just want a discussion on how to do that without replacing the full serializer first.
I'm trying to emulate an api that do something stupid so I need to do the same stupid thing. All numeric values except float from their api are converted to string when serilized to json.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Prerequisites
DEBUG
andRELEASE
modeDescription
I'm not able to use Custom Primitive Converters (JavaScriptPrimitiveConverter) on types string, IEnumerable, numeric and boolean.
Why is it called JavaScriptPrimitiveConverter if we can't do it? I'm maybe just don't understand how it should work.
Funny thing is JavaScriptPrimitiveConverter seem to be used in the function jsonSerializerStrategy.TrySerializeNonPrimitiveObject in SimpleJson.cs
Steps to Reproduce
Create a custom JavaScriptPrimitiveConverter like this one referenced here https://github.com/NancyFx/Nancy/wiki/Sample-JavaScriptPrimitiveConverter
Register it with JsonConfiguration.Default.PrimitiveConverters.Add(new ByteArrayAsBase64Converter());
System Configuration
Code location hint: SerializeValue in SimpleJson.cs.
I just want a discussion on how to do that without replacing the full serializer first.
I'm trying to emulate an api that do something stupid so I need to do the same stupid thing. All numeric values except float from their api are converted to string when serilized to json.
The text was updated successfully, but these errors were encountered: