I understand that deserializing data from a string or binary stream into a data structure is effectively the same parsing. When you deserialize the input string, you use a grammar to create a parse tree from that input, and that parse tree is effectively the encoded data structure.
For example, you may have an array of arrays encoded into a JSON string. When you deserialize that input string, you use the JSON grammar to parse the input string. The parse tree you derive from that input has the same structure as the data that was encoded into the string (in this case an array of arrays).
It seems like most data serialization formats (JSON, YAML, Protobuf) use context free grammars. These grammars are capable of encoding data structures like key value pairs, arrays, and trees.
My question: Are there any data structures that cannot serialized using a context free grammar and require a more powerful grammar such as a context sensitive grammar? Or is it possible to serialize any data structure using a context free grammar, but you may need a longer string than if you were to user a more powerful grammar?