Since a json payload consists of nothing but characters of 1 byte size each, the number logged by these variables would be the total size of payload which is length * 1 byte.
So the length of below json payload will be 7 and its size will be 7 bytes
{"1":1}
pretty printed json below will have 13 as length and 13 bytes will be its size
{
"1": 1
}