fixes JSON serializer

now doesn't export private functions anymore