将json文件导入MongoDb数据库错误??

时间:2018-04-18 23:30:17

标签: json mongodb import

我使用Notepad ++编写要导入MongoDb的文件,但是它会给我一个错误,而且我没有在代码中看到问题。错误是...... 失败:错误处理文档#1:无效字符'"'在对象键之后:值对...附上cmd错误的照片..



{"User":  {"fname":  "Brian", 
"lname":  "Watkins", 
"user_id": "1", 
"email":  "brian.watkins@yahoo.com", 
"follows": ["1"],
"likes": ["18"]}, 
"blog": [{"title": {"$title":  "Peanut Butter and Jelly Sandwich"}, "feed":  "Ingredients are peanut butter, jelly and bread" , "author_id": "1", "blog_id": "b1"}, 
{"title": {"$title":  "Ham Sandwich"}, "feed":  "Ingredients are bread, ham, and mayonnaise or mustard." , "author_id": "1", "blog_id": "b2"}, 
{"title": {"$title":  "Ham and Cheese Sandwich"}, "feed":  "ingredients are bread, ham, cheese, and mayonnaise or mustard." , "author_id": "1", "blog_id": "b3"}, 
{"title": {"$title":  "Grilled Cheese Sandwich"}, "feed":  "Ingredients are bread, cheese, and butter." , "author_id": "1", "blog_id": "b4"}, 
{"title": {"$title":  "Tuna Salad Sandwich"}, "feed":  "Ingredients are tuna salad, bread, and tomatoes." , "author_id": "1", "blog_id": "b5"},
{"title":  {"$title":  "Chicken Salad Sandwich"}, "feed":  "Ingredients are chicken salad, bread, and lettuce." , "author_id": "2", "blog_id": "b6"}, 
{"title": {"$title":  "Vegetarian Sandwich"}, "feed":  "Ingredients are bread, vegetables, and cheese." , "author_id": "2", "blog_id": "b7"}, 
{"title": {"$title":  "Chicken Sandwich"}, "feed":  "Ingredients are fried or grilled chicken, bread, lettuce, and mayonnaise." , "author_id": "2", "blog_id": "b8" }, 
{"title": {"$title":  "Turkey Sandwich"}, "feed":  "Ingredients are turkey, bread, lettuce, tomato, and mustard." , "author_id": "2", "blog_id": "b9"},
{"title": {"$title":  "Meatball Sub"}, "feed":  "Ingredients are bread, meatballs, and marinara sauce." , "author_id": "2", "blog_id": "b10"},
{"title": {"$title":  "Chicken Parm Sandwich"}, "feed":  "Ingredients are bread, chicken, cheese, and marinara sauce." , "author_id": "5", "blog_id": "b11"},
{"title": {"$title":  "Hot Dog"}, "feed":  "Ingredients are hot dog bun, hot dog, mustard, and relish." , "author_id": "3", "blog_id": "b12" }, 
{"title": {"$title":  "Hamburger"}, "feed":  "Ingredients are hamburger bun, hamburger, lettuce, tomato, and ketchup." , "author_id": "3", "blog_id": "b13"}
]
"comment":[{"text":  {"$text":  "thank you!"}, "user_id": "1", "blog_id": "b14"}],
"tag":[{"name": {"$name": "inspired by this blog"},"blog_id": "b15"}]  }

{"User":  {"fname":  "Chris", 
"lname":  "Peete", 
"user_id": "2", 
"email":  "Chris.Peete@yahoo.com", 
"follows": "5",
"likes": "7"}, 
"blog": [{"title": {"$title":  "Quesadilla"}, "feed":  "Ingredients are tortillas, cheese, meat, and salsa." , "author_id": "3", "blog_id": "b14" },
{"title":  {"$title":  "Fish Sandwich"}, "feed":  "Ingredients are bread, fish filet, and mayonnaise." , "author_id": "3", "blog_id": "b15" },
{"title": {"$title":  "Gyro Sandwich"}, "feed":  "Ingredients are pita bread, gyro meat, sauce, tomatoes, and cucumbers." , "author_id": "3", "blog_id": "b16"}, 
{"title": {"$title":  "Falafel Sandwich"}, "feed":  "Ingredients are pita bread, falafel, hummus, tomatoes, and cucumbers." , "author_id": "3", "blog_id": "b17" }, 
{"title": {"$title":  "Club Sandwich"}, "feed":  "Ingredients are bread, turkey, ham, bacon, cheese, lettuce, tomato, and mayonnaise." , "author_id": "3", "blog_id": "b18" },
{"title": {"$title":  "Buffalo Chicken Sandwich"}, "feed":  "Ingredients are bread, chicken, buffalo sauce, lettuce, and ranch dressing." , "author_id": "3", "blog_id": "b19"},
{"title": {"$title":  "BLT Sandwich"}, "feed":  "Ingredients are bread, bacon, lettuce, tomato, and mayonnaise." , "author_id": "3", "blog_id": "b20"}
],
"comment":[{"text":  {"$text":  "amazing!"}, "user_id": "2", "blog_id": "b3"}],
"tag":[{"name": {"$name":"hey check this out!", "blog_id": "b30"}]
}

{"User":  {"fname":  "Mary", 
"lname":  "Dubose", 
"user_id": "3", 
"email":  "Mary.Dubose@yahoo.com", 
"follows": "1",
"likes": "5"}, 
"blog": [{"title": {"$title":  "Tuna Melt"}, "feed":  "Ingredients are bread, tuna, and cheese", "author_id": "3", "blog_id": "b21"}, 
{"title": {"$title":  "Cuban Sandwich"}, "feed":  "Ingredients are bread, ham, cheese, pickles, and mustard." , "author_id": "4", "blog_id": "b22" }, 
{"title": {"$title":  "Reuben Sandwich"}, "feed":  "Ingredients are corned beef, cheese, rye bread, sauerkraut, and dressing." , "author_id": "4", "blog_id": "b23" }, 
{"title": {"$title":  "Italian Sandwich"}, "feed":  "Ingredients are bread, salami, pepperoni, ham, tomatoes, and peppers." , "author_id": "4", "blog_id": "b24" },
{"title": {"$title":  "Pickle Sandwich"}, "feed":  "Ingredients are bread and pickles." , "author_id": "4", "blog_id": "b25" },
{"title": {"$title":  "Roast Beef Sandwich"}, "feed":  "Ingredients are roast beef, bread, cheese, and mustard." , "author_id": "4", "blog_id": "b26"  }, 
{"title": {"$title":  "Breakfast Sandwich"}, "feed":  "Ingredients are English muffin, egg, cheese, and bacon." , "author_id": "4", "blog_id": "b27" }, 
{"title": {"$title":  "Torta"}, "feed":  "Ingredients are steak, refried beans, bread, avocado, tomato, and sour cream." , "author_id": "4", "blog_id": "b28"},
{"title": {"$title":  "Patty Melt"}, "feed":  "Ingredients are bread, hamburger patty, cheese, and onions." , "author_id": "4", "blog_id": "b29" },
{"title": {"$title": "Caprese Sandwich"}, "feed":  "Ingredients are bread, mozzarella cheese, tomato, and sour cream" , "author_id": "4", "blog_id": "b30" }
],
"comment":[{"text":  {"$text":  "that's nasty"}, "user_id": "3", "blog_id": "b7"}],
"tag":[{"name": {"$name": "Mine is superior to yours!", "blog_id": "b44"}]  }

{"User":  {"fname":  "Caroline", 
"lname":  "Hightower", 
"user_id": "4", 
"email":  "Caroline.Hightower@yahoo.com", 
"follows": "2",
"likes": "45"}, 
"blog": [ {"title": {"$title":  "Philly Cheesesteak"}, "feed":  "Ingredients are bread, steak, cheese, and grilled peppers and onions." , "author_id": "4", "blog_id": "b31" },
{"title": {"$title":  "Cucumber Sandwich"}, "feed":  "Ingredients are cucumbers, bread, and cream cheese." , "author_id": "5", "blog_id": "b32" }, 
{"title": {"$title":  "Bagel Sandwich"}, "feed":  "Ingredients are bagel, ham, cheese, and mustard." , "author_id": "5", "blog_id": "b33" }, 
{"title": {"$title":  "Egg Salad Sandwich"}, "feed":  "Ingredients are bread and egg salad." , "author_id": "5", "blog_id": "b34" }, 
{"title": {"$title":  "Po Boy"}, "feed":  "Ingredients are fried shrimp, lettuce, tomato, and dressing." , "author_id": "5", "blog_id": "b35"},
{"title": {"$title":  "Bean Sandwich"}, "feed":  "Ingredients are bread and baked beans." , "author_id": "5", "blog_id": "b36" },
{"title": {"$title":  "Potato Chip Sandwich"}, "feed":  "Ingredients are bread, ham, cheese, and potato chips." , "author_id": "5", "blog_id": "b37" }, 
{"title": {"$title":  "BBQ Sandwich"}, "feed":  "Ingredients are pulled pork, bbq sauce, and coleslaw." , "author_id": "5", "blog_id": "b38" }, 
{"title": {"$title":  "Elvis Sandwich"}, "feed":  "Ingredients are bread, peanut butter, banana, and bacon." , "author_id": "5", "blog_id": "b39" }
],
"tag":[{"name": {"$name": "This what your were talking about", "blog_id": "b8"}]  }




{"User":  {"fname":  "Fatih", 
"lname":  "Sen", 
"user_id": "5", 
"email":  "Fatih.Sen@yahoo.com", 
"follows": "4",
"likes": "33"}, 
"blog": [{"title": {"$title":  "French Dip Sandwich"}, "feed":  "Ingredients are baguette and roast beef." , "author_id": "5", "blog_id": "b40" },
{"title": {"$title":  "Lobster Roll"}, "feed":  "Ingredients are baguette, lobster, and mayonnaise." , "author_id": "5", "blog_id": "b41" },
{"title": {"$title":  "Pimento Cheese Sandwich"}, "feed":  "Ingredients are bread and pimento cheese." , "author_id": "5", "blog_id": "b42"}, 
{"title": {"$title":  "Black Bean Burger"}, "feed":  "Ingredients are hamburger bun, black bean patty, lettuce, tomato, and mustard." , "author_id": "5", "blog_id": "b43" }, 
{"title": {"$title":  "Muffaletta Sandwich"}, "feed":  "Ingredients are bread, meat, cheese, and olive spread." , "author_id": "5", "blog_id": "b44"},
{"title": {"$title":  "Nutella Sandwich"}, "feed":  "Ingredients are bread, Nutella (hazelnut spread), and bananas." , "author_id": "5", "blog_id": "b45"},
{"title": {"$title":  "Turkey and Avocado Wrap"}, "feed":  "Ingredients are tortilla, turkey, avocado, lettuce, and tomato." , "author_id": "5", "blog_id": "b46" }, 
{"title": {"$title":  "Tomato Sandwich"}, "feed":  "Ingredients are bread, tomatoes, mustard, salt, and pepper." , "author_id": "5", "blog_id": "b47"}, 
{"title": {"$title":  "Meatloaf Sandwich"}, "feed":  "Ingredients are meatloaf, bread, and BBQ sauce." , "author_id": "5", "blog_id": "b48"},
{"title": {"$title":  "Spicy Chicken Sandwich"}, "feed":  "Ingredients are hamburger bun, spicy chicken patty, and pickles." , "author_id": "5", "blog_id": "b49" },
{"title": {"$title":  "Cheeseburger"}, "feed":  "Ingredients are hamburger bun, hamburger patty, and cheese." , "author_id": "5", "blog_id": "b50"}
],
"comment":[{"text":  {"$text":  "what in tarnation is this!"}, "user_id": "5", "blog_id": "b29"}],
"tag":[{"name": {"$name":"for you","blog_id": "b4"}]};




error I recieved while importing

0 个答案:

没有答案