added error codes for json api

- defined error codes and messages for json api.
- defined tags for json data set.
- ruby test harness.