anmolitor / elm-protoc-utils / Protobuf.Utils.Int32

Utility methods for Int64 needed in the Protobuf/gRPC context.

int32JsonDecoder : Json.Decode.Decoder Basics.Int

Decodes an Int from a signed integer JSON string (i.e. {"key": "-123456789"}) or a JSON number literal (i.e. {"key": -123}). Fails if the number is outside of the int32 range (-2^31 to 2^31 - 1)

uint32JsonDecoder : Json.Decode.Decoder Basics.Int

Decodes an Int from an unsigned integer JSON string (i.e. {"key": "123456789"}) or a JSON number literal (i.e. {"key": 123}). Fails if the number is outside of the int32 range (0 to 2^32 - 1)