1{-# LANGUAGE RecordWildCards #-}
3{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
4{-# OPTIONS_GHC -fno-warn-orphans #-}
6module Compare.JsonBuilder () where
11import Data.Json.Builder
12import Data.Monoid ((<>))
13import Prelude hiding (id)
16instance JsObject Metadata where
17 toObject Metadata{..} = row "result_type" result_type
19instance Value Metadata where
20 toJson = toJson . toObject
22instance JsObject Geo where
25 row "coordinates" coordinates
27instance Value Geo where
28 toJson = toJson . toObject
30instance Value a => Value (Maybe a) where
31 toJson (Just a) = toJson a
32 toJson Nothing = jsNull
34instance JsObject Story where
36 row "from_user_id_str" from_user_id_str <>
37 row "profile_image_url" profile_image_url <>
38 row "created_at" created_at <>
39 row "from_user" from_user <>
40 row "id_str" id_str <>
41 row "metadata" metadata <>
42 row "to_user_id" to_user_id <>
45 row "from_user_id" from_user_id <>
47 row "iso_language_code" iso_language_code <>
48 row "to_user_id_str" to_user_id_str <>
51instance Value Story where
52 toJson = toJson . toObject
54instance JsObject Result where
56 row "results" results <>
57 row "max_id" max_id <>
58 row "since_id" since_id <>
59 row "refresh_url" refresh_url <>
60 row "next_page" next_page <>
61 row "results_per_page" results_per_page <>
63 row "completed_in" completed_in <>
64 row "since_id_str" since_id_str <>
65 row "max_id_str" max_id_str <>
68instance Value Result where
69 toJson = toJson . toObject
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list