new serializer that handles indentation correctly