-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Add support for object deserialization
I want to be able to create parsers of such a form:
Parser.ParseObject(propertyName => propertyName switch
{
"object" => from _ in Parser.ParseString("list")
select Func.Updater<NavigationPage<TItem>>(Func.Id),
"results" => from results in Parser.ParseType<TItem[]>()
select Func.Updater<NavigationPage<TItem>>(page => page with { Results = results }),
"next_cursor" => from nextCursor in Parser.OptionalGuid
select Func.Updater<NavigationPage<TItem>>(page => page with { NextCursor = nextCursor }),
"has_more" => from hasMore in Parser.Bool
select Func.Updater<NavigationPage<TItem>>(page => page with { HasMore = hasMore }),
_ => Parser.FailedUpdater<NavigationPage<TItem>>()
})Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request