Is there a prescribed way to to represent complex field types as strings? I've found the need lately for a way to represent complex fieldtypes like Matrix, Entries, etc as strings. e.g. in the following plugins:


https://github.com/boboldehampsink/auditlog
https://github.com/boboldehampsink/export


Currently, it seems like you have to more or less account for every fieldtype and do some special processing.

I'm wondering if there is a method that every fieldtype can use (__toString or other) to do this kind of thing in a unified manner.

I was looking at how Craft does the Matrix "preview" for collapsed rows, but I think that's just all JS.
There isn’t, and yeah, the collapsed Matrix block preview text is just created with some Javascript that checks the fields and their inputs within each block.