[API-users] mediatype json formatting

Scott Chamberlain scott at ropensci.org
Sun Jun 29 07:59:56 CEST 2014


Hi,

Thanks for adding media content to the occurrence endpoint output. I
am curious if the below is the intended behavior. It appears as though
the "references" field associated with an array of "type", "format",
and "identifier" is in the next array.  Does it not make more sense to
have the "references" field within the same array so when parsed we
can easily tell that they go together?  I can tell by seeing that the
photo ID is the same, but I wonder if that is the best approach since
then we need to make sure a "references" field goes with an arry of
type/format/identifier by e.g. regex-ing.

Sorry if I am misunderstanding why this is the way it is :)

[
   {
      type: "StillImage",
      format: "image/jpeg",
      identifier:
"http://static.inaturalist.org/photos/696339/medium.JPG?1393473140"
  },
  {
      references: "http://conabio.inaturalist.org/photos/696339"
  },
  {
      type: "StillImage",
      format: "image/jpeg",
      identifier:
"http://static.inaturalist.org/photos/696341/medium.JPG?1393473245"
  },
  {
      references: "http://conabio.inaturalist.org/photos/696341"
  }
]

Thanks!
Scott Chamberlain


More information about the API-users mailing list