Json REST web service

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!
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dinomixCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
thank you.

Still looking for an example though.
0
Starr DuskkASP.NET VB.NET DeveloperAuthor 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.]
0
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
no other answers. closing this out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Services

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.