PartialResponseRequest.Fields 1.0.0-rc2

This is a prerelease version of PartialResponseRequest.Fields.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PartialResponseRequest.Fields --version 1.0.0-rc2
NuGet\Install-Package PartialResponseRequest.Fields -Version 1.0.0-rc2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PartialResponseRequest.Fields" Version="1.0.0-rc2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PartialResponseRequest.Fields --version 1.0.0-rc2
#r "nuget: PartialResponseRequest.Fields, 1.0.0-rc2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PartialResponseRequest.Fields as a Cake Addin
#addin nuget:?package=PartialResponseRequest.Fields&version=1.0.0-rc2&prerelease

// Install PartialResponseRequest.Fields as a Cake Tool
#tool nuget:?package=PartialResponseRequest.Fields&version=1.0.0-rc2&prerelease

< back

Fields Queries


Selecting fields field1,field2,field3

Selecting nested fields field1{field2,field3}

Field parameters field1{field2(top:3)}

Select all fields, but only few in nested *,field2{field3}


class Model {
    public int Field1 { get; set; }
    public Nested Field2 { get; set; }

    class Nested {
        public int Field3 { get; set; }

// Parsing
var parser = new QueryParser();
List<FieldToken> result = parser.Parse("field1,field2{field3}");

// Or building tokens manually with strong type!
var builder = new FieldsBuilder<Model>();
List<FieldToken> result = builder
    .Field(x => x.Field1)
    .Nested(x => x.Field2, x => x.Field3)

// Interpreting
var interpreter = new QueryInterpreter(result);
interpreter.Includes("field1"); // returns if field1 should be included

var nested = interpreter.Visit("field2"); // returns a nested interpreter
nested.Includes("field3"); // returns if you need to include field2.field3 

// Interpreter could be wrapped to support strong type
var interpreter2 = new QueryInterpreter<Model>(interpreter);
interpreter2.Includes(x => x.Field1);
var nested = interpreter2.Visit(x => x.Field2);
nested.Includes(x => x.Field3);

// Serialize back into string query
var serializer = new FieldsSerializer();
string query = serializer.Serialize(result); // field1,field2{field3}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PartialResponseRequest.Fields:

Package Downloads

ASP.NET Web API JSON output formatter for partial response

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.2-beta 5,680 2/28/2021
1.1.0-beta 347 6/13/2020
1.0.0-rc2 309 3/8/2020
1.0.0-rc 478 3/7/2020