[Realtime-feed-users] Detail JSON Structure

Fee, Jeremy jmfee at usgs.gov
Wed Apr 16 19:34:22 UTC 2014


Hello,

It looks like the productType link from the geojson detail documentation is
currently broken.  productType refers to the product id "type" attribute:
http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id

You could try deserializing properties.products into a Dictionary, mapping
product type as a string to an array of product objects.  Other list
members may have a better suggestion.


Thanks,

Jeremy



> I'm trying to deserialize earthquake details using the structure described
> on this page:
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson_detail.php
> trying to get down to the shakemap urls. The data seems to be present
> based on looking at the raw JSON string, but I don't see how to map the
> structure to a set of C# classes.
> The upper part is not too hard to map, but when I get to the <productType>
> level things fall apart.
> products: { <productType><
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#productType>:
> [ { id<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id>:
> String, type<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id>:
> String, code<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id>:
> String, source<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id>:
> String, updateTime<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_id>:
> Integer, status<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_status>:
> String, properties: { <key><
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_propertyName>:
> String, ... }, preferredWeight<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#preferredWeight>:
> Integer, contents: { <path><
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_content>:
> { contentType<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_content>:
> String, lastModified<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_content>:
> Long Integer, length<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_content>:
> Integer, url<
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/glossary.php#product_content>:
> String }, ... } }, ... ],
> Has anyone done this sort of chore, maybe has some advice on how to set up
> a given product type, path, key, etc?
> Yours,
> Wesley A Rogers
> Entr Dmd Mgt Srvc NonHR EATS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/realtime-feed-users/attachments/20140416/159c0f6a/attachment.html>


More information about the Realtime-feed-users mailing list