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

Fix Arrays in SystemText #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix Arrays in SystemText #44

wants to merge 2 commits into from

Conversation

Morcatko
Copy link
Owner

@Morcatko Morcatko commented Jan 5, 2021

No description provided.

@@ -14,25 +15,23 @@ private static object ToObject(this JsonElement jsonElement)
case JsonValueKind.Null: return null;
case JsonValueKind.String: return jsonElement.GetString();
case JsonValueKind.Number: return jsonElement.GetGenericNumber();
case JsonValueKind.Array: return jsonElement.EnumerateArray().Select(j => j.ToObject()).ToArray();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leads to an exception when an array contains complex objects. When ToObject is called with such array element, it throws NotSupportedException.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did any of you manage to make some progress with this?
@OleksandrHorbunovVP what was the end solution that you used?
Currently working on a project where this would be useful but immediately hit this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants