Invalid input: { at lexText

Hi there,

I am using dgraph load to import data but encounter a problem.

this is the command
$ dgraph bulk -r desktops.rdf.gz -s ilka.schema --map_shards=4 --reduce_shards=2 --http localhost:8012 --zero=localhost:5080

this is error message from output:

while lexing _:vState1 <style> "" 
  {"itemLayout":0,"contentMode":0,"transparency":1,"ySpacing":0,"xSpacing":0}"" .: Invalid input: { at lexText

while parsing line "_:vState1 <style> \"\"{\"itemLayout\":0,\"contentMode\":0,\"transparency\":1,\"ySpacing\":0,\"xSpacing\":0}\"\" .\n"

this is the line in the rdf file that the error message refers to :slight_smile:
_:vState1 <style> ""{"itemLayout":0,"contentMode":0,"transparency":1,"ySpacing":0,"xSpacing":0}"" .

in the ilka.schema I have defined the style as string as the following:

style: string .

I appreciate any help !!!

change the RDF file from

_:vState1 <style> “”{“itemLayout”:0,“contentMode”:0,“transparency”:1,“ySpacing”:0,“xSpacing”:0}"" .

to

_:vState1 <style> "{itemLayout:0,contentMode:0,transparency:1,ySpacing:0,xSpacing:0}" .

will get the line parsed without problem

I’m checking this, but I think this is an escaping case. You need to escape any string inside the quotation marks. Using the JSON rules for escaping.

yeah, thats an escaping case.

Thank you ! You have solved the problem!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.