Page MenuHomeFeedback Tracker

Add support for writing and reading typenames in BaseSerializationSaveContext
Closed, ResolvedPublic

Description

I would like to have typename support in the serializer because I need to send some of my custom types to a web api for filtered queries. I was expecting that the serializer just treats them as strings, but right now they seem to be ignored.

array<typename> typenameArray = {int, float, bool};
Print(typenameArray);

ContainerSerializationSaveContext writer();
JsonSaveContainer jsonContainer = new JsonSaveContainer();
writer.SetContainer(jsonContainer);
writer.WriteValue("typenameArray", typenameArray);
auto res = jsonContainer.ExportToString();
Print(res);

SCRIPT : array<typename> typenameArray = 0x000001BA812852C8 {int,float,bool}
SCRIPT : string res = '{}'

The expected output would be

SCRIPT : string res = '{"typenameArray": ["int", "float", "bool"]}'

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

Arkensor updated the task description. (Show Details)
Geez changed the task status from New to Confirmed Internally.Jul 17 2023, 9:34 AM
Geez closed this task as Resolved.Jul 17 2023, 2:46 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Thank you for the report. This will be included in one of the future updates.