lib/json: there's no need for the length attribute in the generated JSON