Table of Contents

Class PaginationParser

Namespace
JsonApiDotNetCore.Queries.Parsing
Assembly
JsonApiDotNetCore.dll

Parses the JSON:API 'page' query string parameter value.

[PublicAPI]
public class PaginationParser : QueryExpressionParser, IPaginationParser
Inheritance
PaginationParser
Implements
Inherited Members

Methods

Parse(string, ResourceType)

Parses the specified source into a PaginationQueryStringValueExpression. Throws a QueryParseException if the input is invalid.

public PaginationQueryStringValueExpression Parse(string source, ResourceType resourceType)

Parameters

source string

The source text to read from.

resourceType ResourceType

The resource type used to lookup JSON:API fields that are referenced in source.

Returns

PaginationQueryStringValueExpression

Remarks

Due to the syntax of the JSON:API pagination parameter, The returned PaginationQueryStringValueExpression is an intermediate value that gets converted into PaginationExpression by PaginationQueryStringParameterReader.

ParsePagination(ResourceType)

protected virtual PaginationQueryStringValueExpression ParsePagination(ResourceType resourceType)

Parameters

resourceType ResourceType

Returns

PaginationQueryStringValueExpression

ParsePaginationElement(ResourceType)

protected virtual PaginationElementQueryStringValueExpression ParsePaginationElement(ResourceType resourceType)

Parameters

resourceType ResourceType

Returns

PaginationElementQueryStringValueExpression