Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Types Serializer are broken #182

Closed
wiphi opened this issue Jan 21, 2019 · 1 comment
Closed

Custom Types Serializer are broken #182

wiphi opened this issue Jan 21, 2019 · 1 comment
Labels
accepted Issue has been accepted and inserted in a future milestone bug

Comments

@wiphi
Copy link

wiphi commented Jan 21, 2019

Version: 3.1.1-RC1
Delphi: 10.2 Tokyo

In the readme is the new registration for custom serializers descriped as
Changed! Custom Types Serializer must be registered by media-type only, without charset definition (e.g. just application/json and not application/json;charset=utf-8)

I want to add some custom type handlers, but it seems to be broken.
How to reproduce:

  • Open up the renders_spring4d_nullable sample
  • compile and run
  • open the URL localhost:8080/api/parent/1
  • Exception EMVCSerializationException will be raised

Since the registration is:

FMVC.Serializers.Items['application/json']
.RegisterTypeSerializer(typeinfo(Nullable<System.Integer>), TNullableIntegerSerializer.Create);

... the serializer do not found them.
When I backport the registration to BuildContentType('application/json', 'utf-8') it works again.

@danieleteti danieleteti added the accepted Issue has been accepted and inserted in a future milestone label Jan 21, 2019
@danieleteti danieleteti added this to the 3.1.1 (beryllium) milestone Jan 21, 2019
@danieleteti
Copy link
Owner

FIXED IN 3.1.1-beryllium-RC3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue has been accepted and inserted in a future milestone bug
Projects
None yet
Development

No branches or pull requests

2 participants