Trying to parse Math Expressions JSON from Wiki API
03:42 09 Jul 2017

I'm parsing in my app the JSON from Wiki api using volley requests with no problem, except from the following one. I'm need to parse these expressions along with the text.

I'm using this URL (for example):

https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&explaintext=&titles=%20Partition%20function%20(statistical%20mechanics)

This is a problematic part in the article: enter image description here

The parsing works juse fine, but when it comes to a math expression, it looks like this in the API:

enter image description here

and in my app, I get along with the text the" {displaystyle = "part. I don't get the "/n" or something. In my app, it looks like this:

enter image description here

enter image description here

I get a lot of spaces and this "{displaystyle". The text freaks out. Is there something that I can do in order to overcome this? I couldnt find an api query for this, but maybe I can do something with the JSON respone itself.

Thanks.

android json mediawiki-api