How is serialized?

I’m doing some testing in Pre-request Script. In that tab, I have access to which I understand to be the data payload being POST’d (in the case of a POST for example).

I have also confirmed that appears to be a string (via typeof

Given example data:

    'fname': 'Joe',
    'lname': 'blogs'

If I paste the above data in the “body”. Then in Pre-request Script tab I assign the same object to variable user:

var user = ['fname': 'Joe', 'lname': 'blogs']

I notice that does not seem to equal JSON.stringify(user).length

So I’m curious, how is serialized?