Skip to main content

Crate jsonapi_core_validation

Crate jsonapi_core_validation 

Source
Expand description

Shared JSON:API member-name validation for jsonapi_core.

Implementation detail. This crate exists so that jsonapi_core (at runtime) and jsonapi_core_derive (at macro-expansion time) validate member names against a single source of truth. It is not covered by SemVer: jsonapi_core and jsonapi_core_derive depend on an exact version of it, and its API may change in any release. Do not depend on it directly — depend on jsonapi_core instead.

The entry point is classify_member_name, which both validates a name per the JSON:API 1.1 character rules and reports which kind of member it is.

Enums§

MemberNameKind
The classification of a valid member name per JSON:API 1.1.

Functions§

classify_member_name
Validate and classify a member name per JSON:API 1.1 rules.