Fixed handling of empty json arrays

This should fix the decoding of empty JSON arrays:
Example:
{
    "mykey": []
}