A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[C#] Gaia JSON

1.2k views · started by Amenze ·
#1
[C#] Gaia JSON
I have no idea on how to get this info

http://www.gaiaonline.com/forum/like/updateCount/94587823/dislike/?_view=json&_gaia_t_=1337&1337


Anyone wanna try helping me out? I've searched YouTube and Stackoverflow, I found a few leads but none have worked so far. They probably DO but I wouldn't have the mindset to make them work lol.:3
#2
what are you trying to do exactly?

What data are you trying to get from the JSON?
#3
what are you trying to do exactly?

What data are you trying to get from the JSON?




I'm trying to get the total_votes and the likes_count.
#4
Do you have any base code that you've already started with?

Your problem seems pretty vague right now. I don't know if you're trying to login to Gaia via HTTP then grab the JSON or if you're trying to accomplish something else.
#5
Parsing REST Services JSON Responses (C#)

you could use the built-in regular expressions, but this may seem counter-intuitive.

this is assuming you already have the text http response.
#6
yeah, best use regex to parse out what you want. i assume you want the values eh?
#7
It's json. You shouldn't be using regular expressions to parse json documents. There's plenty of libraries out there, often built in to the language to do this. I'm not too well versed on .NET, but using regex to parse a json document is a fairly unintuitive approach (the only argument I'd be willing to concede on is if you have to include a 3rd party library, in which case the performance loss may outweigh the gains if it's for a simple, one-off action).
#8
Artificial wrote:
It's json. You shouldn't be using regular expressions to parse json documents. There's plenty of libraries out there, often built in to the language to do this. I'm not too well versed on .NET, but using regex to parse a json document is a fairly unintuitive approach (the only argument I'd be willing to concede on is if you have to include a 3rd party library, in which case the performance loss may outweigh the gains if it's for a simple, one-off action).
yeah regex is bad practice as well and it's not advised to use it all the time. if regex didn't satisfy their needs then it's exactly what you said artificial. some languages even have spiffy json decoding functions and i've never really liked c# only used it a few times. also, welcome back arti :*