Last Updated: February 25, 2016
·
404
· tonyrain

Weather and Money Simple Parser

For some service I need to have some weather and money info. First idea was to make some realization fetching json-data from online web-services.

Trying to find best realization for scaling I make some simple parser structure.

City - class for describing some City instance. This class contains "city name" and "country code".

Weather - class that contains city info and some additional parameters like "pressure", "humidity" and "temperature" hash.

Money - class that describes money converter. It contains "from money code", "to money code" and "rate" info parsing from web-service.

HTTPHelper - class for making some HTTP-requests.

And finally, the best way to convert json data from HTTPHelper is:

HTTPInstanceConverter - class that helps to convert web-service data to Money and Weather structures.

Here you can explore this simple weather and money parser project:
<a href="https://github.com/tonyrain/w-m" target="_blank">Github repo</a>