Skip to content

Extra " when calling MessagePackSerializer.ToJson #1473

@jiatao99

Description

@jiatao99

There is an extra " when calling MessagePackSerializer.ConvertToJson for extension code of 100 (typeless)

In MessagePackSerializer.Json.cs at line 435

writer.Write("{\"$type\":\"" + typeNameTokenBuilder.ToString() + "}");

There is an extra " if after type (when no data after type). This will breaks the JSON format. Should be:

writer.Write("{\"$type\":" + typeNameTokenBuilder.ToString() + "}");

Cheers
Tao

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions