Saving the scene to a custom DSL

I want to save the 3js scene to a custom dsl in a way that I can externalize resources. toJSON and Loader are fine but there is too much redundant data which makes scene editing hard. I want an external dsl format so that it is optimized ? Any ideas on this or a strategy to implement it