Mongo Java Driver 3.6.1 - How to parse a json array structured String to BasicDBList
问题 When I use MongoDB 2.x.x I used (BasicDBList) JSON.parse("[]") to parse the string data to Document array. But the latest MongoDB driver says this is deprecated and the BasicDbObject.parse("") only converts to BasicDBObject . Here is some code samples I earlier used in 2.x.x Java driver BasicDbList skuList = (BasicDBList) JSON.parse(skus); So when I upgraded to 3.6.1, the compiler says this is deprecated. And suggested to use BasicDbObject.parse() But this only accepts JSON objects structured