More direct encoding from Text to EncJSON

This avoids an intermediate step through `ByteString`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4160
GitOrigin-RevId: 50688746fac5b4c315bcb1c0dd54eefe2dc0b565
This commit is contained in:
Auke Booij 2022-04-05 18:56:14 +02:00 committed by hasura-bot
parent fdea752679
commit 8b103cc45a

View File

@ -75,7 +75,7 @@ encJFromChar = EncJSON . BB.charUtf8
{-# INLINE encJFromChar #-}
encJFromText :: Text -> EncJSON
encJFromText = encJFromBS . TE.encodeUtf8
encJFromText = encJFromBuilder . TE.encodeUtf8Builder
{-# INLINE encJFromText #-}
encJFromList :: [EncJSON] -> EncJSON