Hi all,
    First, thank you for viewing my post. I'm working on product to get
information from wiki and show them in office application. And when I am
working with MediaWiki APIs, I found a problem. I use C# to build my
application and I get the query result from MediaWiki by Json format. And my
problem is that Some APIs will return a json object which cannot be
deserialized to a C# object.
    For example, when I try to get the image list of
Seattle<http://en.wikipedia.org/wiki/Seattle>,(the
request url is 
this<http://en.wikipedia.org/w/api.php?action=query&prop=images&imlimit=6&titles=Seattle&format=json>)
The
result will be:
    [image: JSON%20result.jpg]
    Please check the red box in the picture above. As we know that JSON is a
key/value based format and in the red box, this key is dynamically generated
according to the page id. in this way, this json is unable to be
deserialized to
a C# object since I have to map a C# property to a const key/ID in code. I
just wonder why MediaWiki do this? if MediaWiki APIs wants to support to
show multipage in query result, probably it should use Array to show all
page info?
-- 
Thanks,
Justin Zhang
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to