ERROR: failed to read metadata: unexpected end of JSON input

This issue i’m facing. I want solution.

/mnt/c/xampp/htdocs/dockerDemo$ docker build . -t serve_image
ERROR: failed to read metadata: unexpected end of JSON input

Well, we do not know the content of the Dockerfile you are using.