module System.Remote.Json
(
encodeAll
, encodeOne
) where
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy as L
import System.Metrics
import qualified System.Metrics.Json as Json
encodeAll :: Sample -> L.ByteString
encodeAll :: Sample -> ByteString
encodeAll = Value -> ByteString
forall a. ToJSON a => a -> ByteString
A.encode (Value -> ByteString) -> (Sample -> Value) -> Sample -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Sample -> Value
Json.sampleToJson
encodeOne :: Value -> L.ByteString
encodeOne :: Value -> ByteString
encodeOne = Value -> ByteString
forall a. ToJSON a => a -> ByteString
A.encode (Value -> ByteString) -> (Value -> Value) -> Value -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Value -> Value
Json.valueToJson