MessageContentSerializer
Custom serializer for MessageContent that handles both string and array formats.
According to the OpenAI specification, message content can be:
A simple string (serialized as JSON string)
An array of content parts (serialized as JSON array)
This serializer automatically converts between these formats.