Skip to content

Consider using the converters and JsonClassInfo from s_defaultOptions by cloning #32357

@ahsonkhan

Description

@ahsonkhan

internal JsonClassInfo GetOrAddClass(Type classType)
{
_haveTypesBeenCreated = true;
// todo: for performance and reduced instances, consider using the converters and JsonClassInfo from s_defaultOptions by cloning (or reference directly if no changes).
if (!_classes.TryGetValue(classType, out JsonClassInfo? result))
{
result = _classes.GetOrAdd(classType, new JsonClassInfo(classType, this));
}
return result;
}

cc @steveharter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions