| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Json.StringEncoding
Description
JSON string bytes and exact lengths shared by packed values and their writer.
Synopsis
- encodeString :: Text -> ByteString
- encodedLength :: Text -> Int
- writeEncoded :: Text -> MutableByteArray st -> Int -> ST st Int
- writeEncodedSized :: Text -> Int -> MutableByteArray st -> Int -> ST st Int
- plain :: Text -> Bool
- quote :: Word8
Documentation
encodeString :: Text -> ByteString Source #
The bytes aeson writes for a string, quotes included: encodedLength of them.
encodedLength :: Text -> Int Source #
The length of encodeString, from the escape writeEncoded writes for each byte.
writeEncoded :: Text -> MutableByteArray st -> Int -> ST st Int Source #
Write encodeString at an offset, and return the offset after it.
writeEncodedSized :: Text -> Int -> MutableByteArray st -> Int -> ST st Int Source #
Like writeEncoded: the length must equal encodedLength for this same text without Int overflow, and fit from a non-negative target offset.