-i is intended for JSON content while -p is the path to a JSON file. Users may mix this up, so when using -i, if it's not valid JSON, we should check if it's a valid filepath and if so, inform in the error message it looks like a filepath and they should use -p instead. Similarly, if -p doesn't find the file, see if the input is JSON and give better error message.
Summary of the new feature / enhancement
-i
is intended for JSON content while-p
is the path to a JSON file. Users may mix this up, so when using-i
, if it's not valid JSON, we should check if it's a valid filepath and if so, inform in the error message it looks like a filepath and they should use-p
instead. Similarly, if-p
doesn't find the file, see if the input is JSON and give better error message.Proposed technical implementation details (optional)
No response