1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

Encode Range manually.

This commit is contained in:
Rob Rix 2016-02-29 21:36:17 -05:00
parent 621f727a79
commit 4d9fc06a53

View File

@ -31,7 +31,8 @@ instance ToJSON Category where
toJSON s = String . T.pack $ show s
instance ToJSON Info
instance ToJSON a => ToJSON (Line a)
instance ToJSON Range
instance ToJSON Range where
toJSON (Range start end) = Array (fromList [ toJSON start, toJSON end ])
instance ToJSON a => ToJSON (Row a)
instance ToJSON leaf => ToJSON (SplitDiff leaf Info)
instance ToJSON a => ToJSON (SplitPatch a) where