What's happening here is that the string() object in the test_schema list contains a pointer to a C++ object, and it can't be serialised.
As a short-term workaround, you could save the code for the schema, and then read it back into R and evaluate it to recreate the schema. I don't love this solution though, as I've found in the past that most times a solution involves calling eval it's not the right one, so I'll see if I can find you a better alternative!