@@ -13,6 +13,7 @@ module Data.Aeson.Encoding.Internal
1313 , Series (..)
1414 , pairs
1515 , pair
16+ , pair'
1617 -- * Predicates
1718 , nullEncoding
1819 -- * Encoding constructors
@@ -122,7 +123,10 @@ data Series = Empty
122123 deriving (Typeable)
123124
124125pair :: Text -> Encoding -> Series
125−pair name val = Value $ retagEncoding $ text name >< colon >< val
126+pair name val = pair' (text name) val
127+
128+pair' :: Encoding' Text -> Encoding -> Series
129+pair' name val = Value $ retagEncoding $ retagEncoding name >< colon >< val
126130
127131instance Semigroup Series where
128132 Empty <> a = a