We have customers where we are storing XML documents and JSON documents as case ignore strings.
The problem is searching those attributes becomes slow.
You have to do substring searches.
SQL databases have long supported native XML and JSON data types.
eDirectory should also have native attributes that support XML and JSON.
It could then check the well-formedness of the documents when writing to such an attribute.
For searches eDirectory would allow XPath and XQuery for searching through XML type attributes.
For speed some kind of indexing based on XPath expressions would be needed.
For example OpenDJ supports a JSON data type for storing data as well as JSON query.