Class ProtoJsonPropertyProjection
Reads a CLR object as the members JSON sees: public, non-indexed properties, honoring JsonPropertyNameAttribute and JsonIgnoreAttribute, with the caller's naming policy as the fallback. One implementation, so request bodies, query strings, GraphQL documents and expected shapes cannot disagree about a wire name.
public static class ProtoJsonPropertyProjection
- Inheritance
-
ProtoJsonPropertyProjection
- Inherited Members
Methods
Read(object, JsonNamingPolicy?, bool)
Projects a non-null value's members.
public static IReadOnlyList<ProtoJsonProperty> Read(object value, JsonNamingPolicy? namingPolicy = null, bool honorJsonIgnore = true)
Parameters
valueobjectnamingPolicyJsonNamingPolicyhonorJsonIgnorebool
Returns
Read(Type, object?, JsonNamingPolicy?, bool)
Projects a value's members. A null value still yields the type's shape with null values.
public static IReadOnlyList<ProtoJsonProperty> Read(Type type, object? value, JsonNamingPolicy? namingPolicy = null, bool honorJsonIgnore = true)
Parameters
typeTypevalueobjectnamingPolicyJsonNamingPolicyhonorJsonIgnorebool