You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is from a comment section. I assume the user is including a new line entry which registers as the '\n'. My problem is when I convert to csv, that '\n' causes an error in the output, such that:
Whereas in other areas it outputs as:
Line Y contains ';"@AccountName1@accountname2";'
which is what I desire.
My command is: json2csv -d ; --flatten-objects -i <input> -o <output>
I think in my research, this problem is referred to as an escaping issue? I've tried the -q and -Q commands to no avail. How do I resolve this issue?
SECOND ISSUE
I'm running the json2csv command as part of a batch file that I execute through Windows CMD. However, the json2csv command closes my console window.
json2csv -d ; --flatten-objects -i <input> -o <output>
... this would process and output the relevant csv file, but the next command from the batch file never executes.
@for %%d in (%cd%\#Results\*.json) do echo %%d && json2csv -d ; --flatten-objects -i %%d -o %%d.csv
... this would process, outputting the relevant csv files until the final step in the loop. The final json file in the target source gets converted to a csv file, but then the next command in my batch file is not run and the console window closes.
I'm not sure what is the cause of this.
The text was updated successfully, but these errors were encountered:
I definitely seem like an escaping issue.
What do you mean when you say that some lines have the wrong new line but others done? What differences are there between line X and Y to produce the difference?
Can you provide some input data for me to replicate the issue?
Regarding the console issue, it sounds like an issue on your script.
Have you script that json2csv is returning the correct exit code?
Are you doing any other check or action that might case the failure?
FIRST ISSUE
My JSON may contain segments like
from
which is from a comment section. I assume the user is including a new line entry which registers as the '\n'. My problem is when I convert to csv, that '\n' causes an error in the output, such that:
Line X ends with ';"@AccountName1 '
Line X+1 starts with '@accountname2";'
Whereas in other areas it outputs as:
Line Y contains ';"@AccountName1 @accountname2";'
which is what I desire.
json2csv -d ; --flatten-objects -i <input> -o <output>
I think in my research, this problem is referred to as an escaping issue? I've tried the -q and -Q commands to no avail. How do I resolve this issue?
SECOND ISSUE
I'm running the json2csv command as part of a batch file that I execute through Windows CMD. However, the json2csv command closes my console window.
json2csv -d ; --flatten-objects -i <input> -o <output>
... this would process and output the relevant csv file, but the next command from the batch file never executes.
@for %%d in (%cd%\#Results\*.json) do echo %%d && json2csv -d ; --flatten-objects -i %%d -o %%d.csv
... this would process, outputting the relevant csv files until the final step in the loop. The final json file in the target source gets converted to a csv file, but then the next command in my batch file is not run and the console window closes.
I'm not sure what is the cause of this.
The text was updated successfully, but these errors were encountered: