on master help sign in
Add another function for building a key-value pair Encoding
f9e4093Andrew Martin
Data/Aeson/Encoding/Internal.hs+3
@@ -124,6 +124,9 @@ data Series = Empty
124pair :: Text -> Encoding -> Series
124pair :: Text -> Encoding -> Series
125pair name val = Value $ retagEncoding $ text name >< colon >< val
125pair name val = Value $ retagEncoding $ text name >< colon >< val
126
126
127+pair' :: Encoding' Text -> Encoding -> Series
128+pair' name val = Value $ retagEncoding $ retagEncoding name >< colon >< val
129+
127instance Semigroup Series where
130instance Semigroup Series where
128 Empty <> a = a
131 Empty <> a = a
129 a <> Empty = a
132 a <> Empty = a