Json REST web service

Starr Duskk
Starr Duskk used Ask the Experts™
on
I need to write a web service using Json and REST where the other person is sending me name value pairs that I am inserting into my database.

I would like a JSON REST example / tutorial. I have seen a few that are not REST and a few that tell how to send JSON and a few that tell how to connect to an existing webservice, but none like I am describing.

Any suggestions? I have googled and looked at a ton, so please don't just send me a list from google. Send me something specific to what I am asking. thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
While there may not be an exact tutorial example on what you are trying to do, you should be able to piece together a solution. REST is simply a set of rules you follow for your api which tell you how to structure the URL(s) you should be receiving a request on. In your case it would probably be a POST to /[resource], resource being the name of whatever entity is being sent to you (order, customer, etc...) From there once you receive the POST it will have a JSON payload. JSON is just the syntax of the object coming in, such as {"name":"bob"}. Not sure which language or framework you are working with but there is likely a good JSON parser built in. You would simply call JSON.parse on the payload and would get back an object or hash with all of the parameters from the POST, in your case the key value pairs. From there you simply store that object in the DB how you would story any other data. If you then google those three parts separately you can find code examples for pretty much any language easily.
Starr DuskkASP.NET VB.NET Developer

Author

Commented:
thank you.

Still looking for an example though.
Starr DuskkASP.NET VB.NET Developer

Author

Commented:
I am using asp.net and can read a tutorial in C# or vb.net. So far everything I do gives me an error:
[WebException: The remote server returned an error: (500) Internal Server Error.]
Starr DuskkASP.NET VB.NET Developer

Author

Commented:
no other answers. closing this out.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial