It does not work when you use jsonopen -ud with a name starting with number. Example:
alias jsontest {
jsonopen -ud 3test http://api.urbandictionary.com/v0/define?term=runescape
echo -ag Json name: $json(3test)
echo -ag Result: $json(3test,list,6,definition)
}
Seems like $json({NAME}) doesn't work. Here's an example:
alias jsontest {
jsonopen -ud test http://api.urbandictionary.com/v0/define?term=runescape
echo -ag Json name: $json(test)
echo -ag Result: $json(test,list,6,definition)
}
Result:
Json name:
Result: An [MMORPG](Massively Multipplayer Online Role Playing Game) with about 75,000 people playing at it's peak times. Reached 200,000 subscribers in '05. It has 2 versions. They are called F2P (Free 2 play) and P2P (Pay to play). F2P is fun and free, but with P2P you get tons more map space. RuneScape is commonly abbreviated as RS.
Got a line too long error with this code, * /set: line too long (line 270, json4mirc.ini)
alias jsontest {
jsonopen -ud test http://api.urbandictionary.com/v0/define?term=runescape
echo -ag Result: $json(test,list,7,definition)
}