-2

I'm newbie in C# and I have no idea how to consume a JSON from an API. I would like to get this JSON: https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=java&origin=*

And transform it in an C# Object. How Can I make that? Anyone has a very simple example? Also, I would like to understand the code.

I'm using Visual Studio 2015 and I want to make a Universal App. Sorry for the very simple question.

Thanks! =D

1 Answers1

0

you can use json.NET to get an json object. And the use string serializedjson = JsonConvert.SerializeObject(obj); to create an serialized string.

prisar
  • 3,041
  • 2
  • 26
  • 27