How to send the JSON data in rest web services? I have a json object which contains product Id,store Id,price,product Unit,quantity values.Here All the values are integer only except product Unit value. Now, I want to send these values into rest web services. Could you please give any samples or any valuable suggestions?
相关问题
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
相关文章
- json_encode 没有把数组转为json
- Livy Server: return a dataframe as JSON?
- Using JAX-WS 2.2.5 client with JDK/JRE 1.5
- Unexpected end of JSON input from an ajax call
- How do I do a nested list (array) of schema refere
- iconv() Vs. utf8_encode()
- Convert C# Object to Json Object
- LINQ .Include() properties from sub-types in TPH i
Since you have tagged this with the Worklight tag, I'm going to assume you meant to ask how to send json data from a worklight client to an external REST service. In order to do this in Worklight, you need to use a Worklight HTTP adapter. See the documentation here: http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/04_02_HTTP_adapter_-_Communicating_with_HTTP_back-end_systems.pdf
After creating the Worklight adapter, you can then send your JSON data from the client like this:
Your JSON input:
The JAXB class:
The JAX-RS method.
See the documentation of Jersey (the RI for JAX-RS) for details.