go-bindata icon indicating copy to clipboard operation
go-bindata copied to clipboard

add json data

Open xiaobin80 opened this issue 6 years ago • 2 comments

When "hotelId=4" is added, the data cannot be "curl" out.

repos: https://github.com/harlow/go-micro-services data format: [ { "hotelId": "1", "code": "RACK", "inDate": "2015-04-09", "outDate": "2015-04-10", "roomType": { "bookableRate": 109.00, "code": "KNG", "description": "King sized bed", "totalRate": 109.00, "totalRateInclusive": 123.17 } }, { "hotelId": "2", "code": "RACK", "inDate": "2015-04-09", "outDate": "2015-04-10", "roomType": { "bookableRate": 139.00, "code": "QN", "description": "Queen sized bed", "totalRate": 139.00, "totalRateInclusive": 153.09 } }, { "hotelId": "3", "code": "RACK", "inDate": "2015-04-09", "outDate": "2015-04-10", "roomType": { "bookableRate": 109.00, "code": "KNG", "description": "King sized bed", "totalRate": 109.00, "totalRateInclusive": 123.17 } }, { "hotelId": "4", "code": "RACK", "inDate": "2015-04-09", "outDate": "2015-04-10", "roomType": { "bookableRate": 139.00, "code": "QN", "description": "Queen sized bed", "totalRate": 139.00, "totalRateInclusive": 153.09 } } ]

xiaobin80 avatar Aug 05 '19 03:08 xiaobin80

I doubt this is a go-bindata issue, but in any case you are going to need to be more specific about what you are trying to do, what you expect to see, and what error you are actually seeing.

kevinburke avatar Aug 05 '19 14:08 kevinburke

I doubt this is a go-bindata issue, but in any case you are going to need to be more specific about what you are trying to do, what you expect to see, and what error you are actually seeing.

Thank you for your reply. Purpose: Add a row with data for hotelID=4.

cURL the API endpoint and receive GeoJSON response:(cmd.exe) C:\Users\xiaobin>curl "http://10.241.50.100:5000/hotels?inDate=2015-04-09&outDate=2015-04-10"

The results obtained: { "features":[ {"geometry":{"coordinates":[-122.4071,37.7834],"type":"Point"},"id":"3","properties":{"name":"Hotel Zetta","phone_number ":"(415) 543-8555"},"type":"Feature"}, {"geometry":{"coordinates":[-122.4112,37.7867],"type":"Point"},"id":"1","properties":{"name":"Clift Hotel","phone_number ":"(415) 775-4700"},"type":"Feature"}, {"geometry":{"coordinates":[-122.4005,37.7854],"type":"Point"},"id":"2","properties":{"name":"W San Francisco"," Phone_number":"(415) 777-5300"},"type":"Feature"} ], "type": "FeatureCollection" }

xiaobin80 avatar Aug 06 '19 01:08 xiaobin80