Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Render the barcode when rendering releases as JSON

  • Loading branch information...
commit a74748e846788ee6782f19875f08ac1939424951 1 parent 25dd8ed
@ocharles ocharles authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/MusicBrainz/API/JSON.hs
View
5 src/MusicBrainz/API/JSON.hs
@@ -149,10 +149,15 @@ instance ToJSON Release where
, "language" .= releaseLanguage
, "packaging" .= releasePackaging
, "status" .= releaseStatus
+ , "barcode" .= releaseBarcode
]
--------------------------------------------------------------------------------
+instance ToJSON Barcode where
+ toJSON = toJSON . review barcode
+
+--------------------------------------------------------------------------------
instance ToJSON ReleaseGroup where
toJSON ReleaseGroup{..} = object
[ "name" .= releaseGroupName
Please sign in to comment.
Something went wrong with that request. Please try again.