0

unknown character import failed caused by the character shown in the pic.

the json used in my proj is like this:

{"user_exam_id":1,"end_time":""}

(ff gone..., you need copy it to some editor.)

the error is:

Failed: error processing document #1: invalid character '\f' in string literal

I don't even known how to replace it or delete it. it looks like ^L in vim. however, I tried to replace ^L and L with "", nothing happened...

Cœur
  • 37,241
  • 25
  • 195
  • 267
shanyy
  • 86
  • 5

1 Answers1

0

eventually solved~~~~~

the ff is just \x0c,which is not printable. we need to remove all unprintable characters from the json-file.

with sed, we can do it like this:

cat /tmp/testf.txt | sed 's/[^[:print:]]//g' > /tmp/an.txt

more information here. replace unprintable characters with sed

shanyy
  • 86
  • 5