Encoders and Decoders for JSON that goes over the wire.
You will rarely use any of these. Encoding and decoding will usually
be done for you by by Mastodon.Requests.requestToRawRequest, which
your code will call indirectly via Mastodon.Requests.serverRequest.
Decode an Entity.
You'll usually know which entity you're looking for, and will use its decoder explicitly. In case you don't...
Similar to encodeEntity, but returns the v field, if it is non-null,
giving you the raw data that came over the wire, if this entity DID come over
the wire, and is not one of the few that don't have a v field.
Decode an Account.
Encode an Account.
Decode a Field.
Encode a Field.
Decode an App.
Encode an App.
Decode a Source.
Encode a Source.
Decode a Token.
Encode a Token.
Decode an Application.
Encode an Application.
Decode an Attachment.
Encode an Attachment.
Decode a Card.
Encode a Card.
Decode a Context.
Encode a Context.
Decode a Visibility.
Encode a Visibility.
Decode an Emoji.
Encode an Emoji.
Encode a Status.
Decode a Status.
Encode an Error.
Note that the httpStatus field does NOT get encoded.
You'll probably never need to encode one of these, anyway.
Decode an Error.
Since the httpStatus comes from the HTTP headers, it needs to be
passed in here as a parameter, as it isn't in the JSON.
Encode a Poll.
Decode a Poll.
Encode a Filter.
Decode a Filter.
Encode a FilterContext.
Decode a FilterContext.
Encode an Instance.
Decode an Instance.
Encode an Activity.
Mastodon encodes all the Int fields as strings, so we follow suit here.
Pleroma and Gab don't support "GET instance/activity".
Decode an Activity
Encode a ListEntity.
Decode a ListEntity.
Encode a Notification.
Decode a Notification.
Encode a NotificationType.
Decode a `NotificationType.
Encoder for PushSubscription.
Decoder for PushSubscription.
Encoder for Relationship.
Decode a Relationship.
Encoder for Results.
Decoder for Results.
Encoder for ScheduledStatus.
Decoder for ScheduledStatus.
Encoder for Conversation.
Decoder for Conversation.
Encoder for Group.
Decoder for Group.
Encoder for GroupRelationship.
Decoder for GroupRelationship.
Encode a Tag.
Decode a Tag.
Encoder for Authorization.
Decoder for Authorization.
Encode Maybe x to Json.Encode.null if it's Nothing,
or with the encoder otherwise.
Convert Privacy to a String.
Convert a NoticiationType to a string
Turn a FilterContext into a String.
Encode an
Entityinto aValue.