Metadata json support

This definitely looks like error output to me. Why did you move it to stdout?