The problem is ill-posed; and the question simply makes no sense. There is no "optimized" or not-optimized JSON.
You are just talking about completely different JavaScript objects. Naturally, their serialized forms are different.
Compare:
var a = [1, "some text", null];
var b = {number: 1, text: "some text", reference: null};
var sA = JSON.stringify(a);
var sB = JSON.stringify(b);
Those objects are both of the object types, but they are different. First object has properties named 0, 1 and 2. Indices are actually no different from properties, they just use specialized names. The second object has analogous properties named "number", "text" and "reference". Another difference is: first object, as an array, has property "length", which is not defined in the second one.
Please see:
JavaScript data types and data structures — JavaScript,
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof,
Object — JavaScript,
Array — JavaScript,
JSON — JavaScript.
Now about compressing… what you though of is not compression at all; this is just having different objects. By the way, the "bigger" object is more preferable in most cases. You can compress and decompress any string, no matter if it is JSON or not. There is a number of libraries doing that. To name just a few:
GitHub — pieroxy/lz-string: LZ-based compression algorithm for JavaScript,
LZW javascript compress/decompress — GitHub,
see also
Text Compression for Web Developers — HTML5 Rocks.
—SA