J'ai lu le fichier json après le charger dans json mais j'ai eu l'erreur JSON :: ParserError jeton inattendu à, je ne pouvais pas json parse.Below j'ai mentionné ce que je suis sortie après fichier luRuby on Rails - erreur d'analyse JSON jeton inattendu
Voici mon code,
file = File.read("sample.json")
hash = JSON.load(file)
après lu mon fichier JSON,
"{\"rename\"=>[{\"from\"=>\"TTTC\", \"to\"=>\"AAAB\"}, {\"from\"=>\"AAAA\", \"to\"=>\"Description\"}, {\"from\"=>\"AAAC\", \"to\"=>\"test\"}], \"drop\"=>{\"fields\"=>[\"AAAG\", \"AAAH\"]}}"
Thanks.Now son beau travail – Karthick