"Old" cgminer version on my desktop ... 4.6.1 ... just happens to match.
Using API.class that is supplied with cgminer:
# java API version
Attempting to send 'version' to 127.0.0.1:4028
Answer='STATUS=S,When=1420253231,Code=22,Msg=CGMiner versions,Description=cgminer 4.6.1|VERSION,CGMiner=4.6.1,API=3.4|'
[STATUS] =>
(
[STATUS] => S
[When] => 1420253231
[ Code] => 22
[Msg] => CGMiner versions
[Description] => cgminer 4.6.1
)
[VERSION] =>
(
[0] => VERSION
[CGMiner] => 4.6.1
[API] => 3.4
)
# java API "addpool|stratum+tcp://stratum8080.kano.is:8080,Kano,addp"
Attempting to send 'addpool|stratum+tcp://stratum8080.kano.is:8080,Kano,addp' to 127.0.0.1:4028
Answer='STATUS=S,When=1420253142,Code=55,Msg=Added pool 'stratum+tcp://stratum8080.kano.is:8080',Description=cgminer 4.6.1|'
[STATUS] =>
(
[STATUS] => S
[When] => 1420253142
[ Code] => 55
[Msg] => Added pool 'stratum+tcp://stratum8080.kano.is:8080'
[Description] => cgminer 4.6.1
)
# java API '{"command":"addpool","parameter":"stratum+tcp://stratum8080.kano.is:8080,Kano,addp"}'
Attempting to send '{"command":"addpool","parameter":"stratum+tcp://stratum8080.kano.is:8080,Kano,addp"}' to 127.0.0.1:4028
Answer='{"STATUS":[{"STATUS":"S","When":1420253204,"Code":55,"Msg":"Added pool 'stratum+tcp://stratum8080.kano.is:8080'","Description":"cgminer 4.6.1"}],"id":1}'
[{"STATUS":[{"STATUS":"S"] =>
(
[0] => {"STATUS":[{"STATUS":"S"
[1] => "When":1420253204
[2] => "Code":55
[3] => "Msg":"Added pool 'stratum+tcp://stratum8080.kano.is:8080'"
[4] => "Description":"cgminer 4.6.1"}]
[5] => "id":1}
)
All above looks OK to me ... for me.
So ... the possible problems are:
1) the JSON decoder you compiled into cgminer is a bad choice and you should use the json code supplied with cgminer
2) whatever you are using to send to the cgminer API is changing the data from simply 8 bit ascii to something else
3) the cgminer you are using is not official and they've messed with the API or the json included code
4) ?