Json.loads

时间:2015-10-04 17:58:01

标签: python json

我正在尝试处理从Scopus下载的一些数据,我设法重现了我得到的错误:

import json

text = """{"abstracts-retrieval-response":{"coredata":{"prism:doi":"10.1016/j.cma.2013.10.001","dc:title":"A hierarchical detection framework for computational contact mechanics","prism:aggregationType":"Journal","citedby-count":"0","prism:publicationName":"Computer Methods in Applied Mechanics and Engineering","prism:volume":"268","prism:pageRange":"574-588","prism:coverDate":"2014-01-01"},"authors":{"author": [{"@_fa": "true", "@auid": "22939868800", "@seq": "1", "ce:initials":"A.M.","ce:indexed-name":"Aragon A.M.","ce:surname":"Aragón","ce:given-name":"Alejandro M.","preferred-name":{"ce:initials":"A.M.","ce:indexed-name":"Aragón A.","ce:surname":"Aragón","ce:given-name":"Alejandro M."},"author-url":"http://api.elsevier.com/content/author/author_id:22939868800","affiliation":{"@href": "http://api.elsevier.com/content/affiliation/affiliation_id:60028186", "@id": "60028186"}},{"@_fa": "true", "@auid": "7101755440", "@seq": "2", "ce:initials":"J.-F.","ce:indexed-name":"Molinari J.-F.","ce:surname":"Molinari","ce:given-name":"Jean-François","preferred-name":{"ce:initials":"J.F.","ce:indexed-name":"Molinari J.","ce:surname":"Molinari","ce:given-name":"Jean François"},"author-url":"http://api.elsevier.com/content/author/author_id:7101755440","affiliation": [{"@href": "http://api.elsevier.com/content/affiliation/affiliation_id:60028186", "@id": "60028186"},{"@href": "http://api.elsevier.com/content/affiliation/affiliation_id:60028186", "@id": "60028186"}]}]},"item":{"bibrecord":{"tail":{"bibliography":{"@refcount": "66", "reference": [{"@id": "1", "ref-info":{"ref-title":{"ref-titletext":"Ber die berührung fester elastischer körper"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"84934701192"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"H.","ce:indexed-name":"Hertz H.","ce:surname":"Hertz"}},"ref-sourcetitle":"Journal für die reine und angewandte Mathematik","ref-publicationyear":{"@first": "1881"},"ref-volisspag":{"voliss":{"@issue": "92", "@volume": "92"},"pagerange":{"@first": "156", "@last": "171"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://www.reference-global.com/doi/abs/10.1515/crll.1882.92.156"}}},"ref-fulltext":"Hertz H. ber die berührung fester elastischer körper. Journal für die reine und angewandte Mathematik 1881, 92(92):156-171. http://www.reference-global.com/doi/abs/10.1515/crll.1882.92.156."},{"@id": "2", "ref-info":{"ref-title":{"ref-titletext":"Crashworthiness analysis in the automotive industry"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0027086693"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"K.","ce:indexed-name":"Schweizerhof K.","ce:surname":"Schweizerhof"},{"@seq": "2", "ce:initials":"L.","ce:indexed-name":"Nilsson L.","ce:surname":"Nilsson"},{"@seq": "3", "ce:initials":"J.","ce:indexed-name":"Hallquist J.","ce:surname":"Hallquist"}]},"ref-sourcetitle":"International Journal of Computer Applications in Technology, Special Issue on the Industrial Use of Finite-element Analysis","ref-publicationyear":{"@first": "1992"},"ref-volisspag":{"voliss":{"@volume": "5"},"pagerange":{"@first": "134", "@last": "156"}},"ref-text":"2/3/4"},"ref-fulltext":"Schweizerhof K., Nilsson L., Hallquist J. Crashworthiness analysis in the automotive industry. International Journal of Computer Applications in Technology, Special Issue on the Industrial Use of Finite-element Analysis 1992, 5(2/3/4):134-156."},{"@id": "3", "ref-info":{"ref-title":{"ref-titletext":"Aspects of modelling and computation in the analysis of metal forming"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0025398772"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"I.S.","ce:indexed-name":"Doltsinis I.S.","ce:surname":"Doltsinis"}},"ref-sourcetitle":"Engineering Computations","ref-publicationyear":{"@first": "1990"},"ref-volisspag":{"voliss":{"@issue": "1", "@volume": "7"},"pagerange":{"@first": "2", "@last": "20"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://dx.doi.org/10.1108/eb02378"}}},"ref-fulltext":"Doltsinis I.S. Aspects of modelling and computation in the analysis of metal forming. Engineering Computations 1990, 7(1):2-20. http://dx.doi.org/10.1108/eb02378."},{"@id": "4", "ref-info":{"ref-title":{"ref-titletext":"A model of third body abrasive friction and wear in hot metal forming"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0345035205"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"S.","ce:indexed-name":"Stupkiewicz S.","ce:surname":"Stupkiewicz"},{"@seq": "2", "ce:initials":"Z.","ce:indexed-name":"Mroz Z.","ce:surname":"Mróz"}]},"ref-sourcetitle":"Wear","ref-publicationyear":{"@first": "1999"},"ref-volisspag":{"voliss":{"@issue": "1", "@volume": "231"},"pagerange":{"@first": "124", "@last": "138"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://dx.doi.org/10.1016/S0043-1648(99)00124-6"}}},"ref-fulltext":"Stupkiewicz S., Mróz Z. A model of third body abrasive friction and wear in hot metal forming. Wear 1999, 231(1):124-138. http://dx.doi.org/10.1016/S0043-1648(99)00124-6."},{"@id": "5", "ref-info":{"ref-title":{"ref-titletext":"A single surface contact algorithm for the post-buckling analysis of shell structures"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0025258626"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"D.J.","ce:indexed-name":"Benson D.J.","ce:surname":"Benson"},{"@seq": "2", "ce:initials":"J.O.","ce:indexed-name":"Hallquist J.O.","ce:surname":"Hallquist"}]},"ref-sourcetitle":"Computer Methods in Applied Mechanics and Engineering","ref-publicationyear":{"@first": "1990"},"ref-volisspag":{"voliss":{"@issue": "2", "@volume": "78"},"pagerange":{"@first": "141", "@last": "163"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://doi.acm.org/10.1016/0045-7825(90)90098-7"}}},"ref-fulltext":"Benson D.J., Hallquist J.O. A single surface contact algorithm for the post-buckling analysis of shell structures. Computer Methods in Applied Mechanics and Engineering 1990, 78(2):141-163. http://doi.acm.org/10.1016/0045-7825(90)90098-7."},{"@id": "6", "ref-info":{"ref-title":{"ref-titletext":"Adaptive lagrangian modelling of ballistic penetration of metallic targets"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0031095101"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"G.","ce:indexed-name":"Camacho G.","ce:surname":"Camacho"},{"@seq": "2", "ce:initials":"M.","ce:indexed-name":"Ortiz M.","ce:surname":"Ortiz"}]},"ref-sourcetitle":"Computer Methods in Applied Mechanics and Engineering","ref-publicationyear":{"@first": "1997"},"ref-volisspag":{"voliss":{"@issue": "3-4", "@volume": "142"},"pagerange":{"@first": "269", "@last": "301"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://doi.acm.org/10.1016/S0045-7825(96)01134-6"}}},"ref-fulltext":"Camacho G., Ortiz M. Adaptive lagrangian modelling of ballistic penetration of metallic targets. Computer Methods in Applied Mechanics and Engineering 1997, 142(3-4):269-301. http://doi.acm.org/10.1016/S0045-7825(96)01134-6."},{"@id": "7", "ref-info":{"ref-title":{"ref-titletext":"A contact searching algorithm including bounding volume trees applied to finite sliding mortar formulations"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"35548959580"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"B.","ce:indexed-name":"Yang B.","ce:surname":"Yang"},{"@seq": "2", "ce:initials":"T.","ce:indexed-name":"Laursen T.","ce:surname":"Laursen"}]},"ref-sourcetitle":"Computational Mechanics","ref-publicationyear":{"@first": "2008"},"ref-volisspag":{"voliss":{"@volume": "41"},"pagerange":{"@first": "189", "@last": "205"}}},"ref-fulltext":"Yang B., Laursen T. A contact searching algorithm including bounding volume trees applied to finite sliding mortar formulations. Computational Mechanics 2008, 41:189-205. 10.1007/s00466-006-0116-z."},{"@id": "8", "ref-info":{"ref-title":{"ref-titletext":"A parallel contact detection algorithm for transient solid dynamics simulations using PRONTO3D"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0032137272"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"S.W.","ce:indexed-name":"Attaway S.W.","ce:surname":"Attaway"},{"@seq": "2", "ce:initials":"B.A.","ce:indexed-name":"Hendrickson B.A.","ce:surname":"Hendrickson"},{"@seq": "3", "ce:initials":"S.J.","ce:indexed-name":"Plimpton S.J.","ce:surname":"Plimpton"},{"@seq": "4", "ce:initials":"D.R.","ce:indexed-name":"Gardner D.R.","ce:surname":"Gardner"},{"@seq": "5", "ce:initials":"C.T.","ce:indexed-name":"Vaughan C.T.","ce:surname":"Vaughan"},{"@seq": "6", "ce:initials":"K.H.","ce:indexed-name":"Brown K.H.","ce:surname":"Brown"},{"@seq": "7", "ce:initials":"M.W.","ce:indexed-name":"Heinstein M.W.","ce:surname":"Heinstein"}]},"ref-sourcetitle":"Computational Mechanics","ref-publicationyear":{"@first": "1998"},"ref-volisspag":{"voliss":{"@volume": "22"},"pagerange":{"@first": "143", "@last": "159"}}},"ref-fulltext":"Attaway S.W., Hendrickson B.A., Plimpton S.J., Gardner D.R., Vaughan C.T., Brown K.H., Heinstein M.W. A parallel contact detection algorithm for transient solid dynamics simulations using PRONTO3D. Computational Mechanics 1998, 22:143-159. 10.1007/s004660050348."},{"@id": "9", "ref-info":{"ref-title":{"ref-titletext":"Collision detection for interactive graphics applications"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0029373569"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"P.","ce:indexed-name":"Hubbard P.","ce:surname":"Hubbard"}},"ref-sourcetitle":"IEEE Transactions on Visualization and Computer Graphics","ref-publicationyear":{"@first": "1995"},"ref-volisspag":{"voliss":{"@issue": "3", "@volume": "1"},"pagerange":{"@first": "218", "@last": "230"}}},"ref-fulltext":"Hubbard P. Collision detection for interactive graphics applications. IEEE Transactions on Visualization and Computer Graphics 1995, 1(3):218-230. 10.1109/2945.466717."},{"@id": "10", "ref-info":{"ref-title":{"ref-titletext":"Efficient collision detection using bounding volume hierarchies of k-dops"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0031673012"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"J.","ce:indexed-name":"Klosowski J.","ce:surname":"Klosowski"},{"@seq": "2", "ce:initials":"M.","ce:indexed-name":"Held M.","ce:surname":"Held"},{"@seq": "3", "ce:initials":"J.","ce:indexed-name":"Mitchell J.","ce:surname":"Mitchell"},{"@seq": "4", "ce:initials":"H.","ce:indexed-name":"Sowizral H.","ce:surname":"Sowizral"},{"@seq": "5", "ce:initials":"K.","ce:indexed-name":"Zikan K.","ce:surname":"Zikan"}]},"ref-sourcetitle":"IEEE Transactions on Visualization and Computer Graphics","ref-publicationyear":{"@first": "1998"},"ref-volisspag":{"voliss":{"@issue": "1", "@volume": "4"},"pagerange":{"@first": "21", "@last": "36"}}},"ref-fulltext":"Klosowski J., Held M., Mitchell J., Sowizral H., Zikan K. Efficient collision detection using bounding volume hierarchies of k-dops. IEEE Transactions on Visualization and Computer Graphics 1998, 4(1):21-36. 10.1109/2945.675649."},{"@id": "11", "ref-info":{"ref-title":{"ref-titletext":"Evaluation of collision detection methods for virtual reality fly-throughs"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0000276365"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"M.","ce:indexed-name":"Held M.","ce:surname":"Held"},{"@seq": "2", "ce:initials":"J.T.","ce:indexed-name":"Klosowski J.T.","ce:surname":"Klosowski"},{"@seq": "3", "ce:initials":"J.S.","ce:indexed-name":"Mitchell J.S.","ce:surname":"Mitchell"}]},"ref-publicationyear":{"@first": "1995"},"ref-volisspag":{"pagerange":{"@first": "205", "@last": "210"}},"ref-text":"Canadian Conference on Computational Geometry"},"ref-fulltext":"M. Held, J.T. Klosowski, J.S. Mitchell, Evaluation of collision detection methods for virtual reality fly-throughs, in: Canadian Conference on Computational Geometry, 1995, pp. 205-210."},{"@id": "12", "ref-info":{"ref-title":{"ref-titletext":"Interference detection among solids and surfaces"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0018324933"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"J.W.","ce:indexed-name":"Boyse J.W.","ce:surname":"Boyse"}},"ref-sourcetitle":"Communications of the ACM","ref-publicationyear":{"@first": "1979"},"ref-volisspag":{"voliss":{"@issue": "1", "@volume": "22"},"pagerange":{"@first": "3", "@last": "9"}}},"ref-fulltext":"Boyse J.W. Interference detection among solids and surfaces. Communications of the ACM 1979, 22(1):3-9. 10.1145/359046.359048."},{"@id": "13", "ref-info":{"ref-title":{"ref-titletext":"Approximation hierarchies and s-bounds"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0001469172"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"S.","ce:indexed-name":"Cameron S.","ce:surname":"Cameron"}},"ref-sourcetitle":"Proceedings of the First ACM Symposium on Solid Modeling Foundations and CAD/CAM Applications, SMA '91","ref-publicationyear":{"@first": "1991"},"ref-volisspag":{"pagerange":{"@first": "129", "@last": "137"}},"ref-text":"ACM, New York, NY, USA"},"ref-fulltext":"Cameron S. Approximation hierarchies and s-bounds. Proceedings of the First ACM Symposium on Solid Modeling Foundations and CAD/CAM Applications, SMA '91 1991, 129-137. ACM, New York, NY, USA. 10.1145/112515.112537."},{"@id": "14", "ref-info":{"ref-title":{"ref-titletext":"3D game engine design"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0003887062"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"D.H.","ce:indexed-name":"Eberly D.H.","ce:surname":"Eberly"}},"ref-sourcetitle":"The Morgan Kaufmann Series in Interactive 3D Technology","ref-publicationyear":{"@first": "2006"},"ref-text":"Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, A Practical Approach to Real-Time Computer Graphics"},"ref-fulltext":"Eberly D.H. 3D game engine design. The Morgan Kaufmann Series in Interactive 3D Technology 2006, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. second ed."},{"@id": "15", "ref-info":{"ref-title":{"ref-titletext":"A collision detection algorithm based on velocity and distance bounds"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0022583115"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"R.","ce:indexed-name":"Culley R.","ce:surname":"Culley"},{"@seq": "2", "ce:initials":"K.","ce:indexed-name":"Kempf K.","ce:surname":"Kempf"}]},"ref-publicationyear":{"@first": "1986"},"ref-volisspag":{"voliss":{"@volume": "3"},"pagerange":{"@first": "1064", "@last": "1069"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"doi:10.1109/ROBOT.1986.1087575"}},"ref-text":"Proceedings of 1986 IEEE International Conference on Robotics and Automation"},"ref-fulltext":"R. Culley, K. Kempf, A collision detection algorithm based on velocity and distance bounds, in: Proceedings of 1986 IEEE International Conference on Robotics and Automation, vol. 3, 1986, pp. 1064-1069. doi:10.1109/ROBOT.1986.1087575."},{"@id": "16", "ref-info":{"ref-title":{"ref-titletext":"A fast procedure for computing the distance between complex objects in three-dimensional space"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0023998710"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"E.","ce:indexed-name":"Gilbert E.","ce:surname":"Gilbert"},{"@seq": "2", "ce:initials":"D.","ce:indexed-name":"Johnson D.","ce:surname":"Johnson"},{"@seq": "3", "ce:initials":"S.","ce:indexed-name":"Keerthi S.","ce:surname":"Keerthi"}]},"ref-sourcetitle":"IEEE Journal of Robotics and Automation","ref-publicationyear":{"@first": "1988"},"ref-volisspag":{"voliss":{"@issue": "2", "@volume": "4"},"pagerange":{"@first": "193", "@last": "203"}}},"ref-fulltext":"Gilbert E., Johnson D., Keerthi S. A fast procedure for computing the distance between complex objects in three-dimensional space. IEEE Journal of Robotics and Automation 1988, 4(2):193-203. 10.1109/56.2083."},{"@id": "17", "ref-info":{"ref-title":{"ref-titletext":"Collision detection by four-dimensional intersection testing"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0025449463"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"S.","ce:indexed-name":"Cameron S.","ce:surname":"Cameron"}},"ref-sourcetitle":"IEEE Transactions on Robotics and Automation","ref-publicationyear":{"@first": "1990"},"ref-volisspag":{"voliss":{"@issue": "3", "@volume": "6"},"pagerange":{"@first": "291", "@last": "302"}}},"ref-fulltext":"Cameron S. Collision detection by four-dimensional intersection testing. IEEE Transactions on Robotics and Automation 1990, 6(3):291-302. 10.1109/70.56661."},{"@id": "18", "ref-info":{"ref-title":{"ref-titletext":"Set operations on polyhedra using binary space partitioning trees"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0010789985"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"W.C.","ce:indexed-name":"Thibault W.C.","ce:surname":"Thibault"},{"@seq": "2", "ce:initials":"B.F.","ce:indexed-name":"Naylor B.F.","ce:surname":"Naylor"}]},"ref-sourcetitle":"Proceedings of the 14th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '87","ref-publicationyear":{"@first": "1987"},"ref-volisspag":{"pagerange":{"@first": "153", "@last": "162"}},"ref-text":"ACM, New York, NY, USA"},"ref-fulltext":"Thibault W.C., Naylor B.F. Set operations on polyhedra using binary space partitioning trees. Proceedings of the 14th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '87 1987, 153-162. ACM, New York, NY, USA. 10.1145/37401.37421."},{"@id": "19", "ref-info":{"ref-title":{"ref-titletext":"Merging bsp trees yields polyhedral set operations"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0009945351"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"B.","ce:indexed-name":"Naylor B.","ce:surname":"Naylor"},{"@seq": "2", "ce:initials":"J.","ce:indexed-name":"Amanatides J.","ce:surname":"Amanatides"},{"@seq": "3", "ce:initials":"W.","ce:indexed-name":"Thibault W.","ce:surname":"Thibault"}]},"ref-sourcetitle":"Proceedings of the 17th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '90","ref-publicationyear":{"@first": "1990"},"ref-volisspag":{"pagerange":{"@first": "115", "@last": "124"}},"ref-text":"ACM, New York, NY, USA"},"ref-fulltext":"Naylor B., Amanatides J., Thibault W. Merging bsp trees yields polyhedral set operations. Proceedings of the 17th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '90 1990, 115-124. ACM, New York, NY, USA. 10.1145/97879.97892."},{"@id": "20", "ref-info":{"ref-title":{"ref-titletext":"Multidimensional binary search trees used for associative searching"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0016557674"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"J.L.","ce:indexed-name":"Bentley J.L.","ce:surname":"Bentley"}},"ref-sourcetitle":"Communications of the ACM","ref-publicationyear":{"@first": "1975"},"ref-volisspag":{"voliss":{"@issue": "9", "@volume": "18"},"pagerange":{"@first": "509", "@last": "517"}}},"ref-fulltext":"Bentley J.L. Multidimensional binary search trees used for associative searching. Communications of the ACM 1975, 18(9):509-517. 10.1145/361002.361007."},{"@id": "21", "ref-info":{"ref-title":{"ref-titletext":"An algorithm for finding best matches in logarithmic expected time"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0000567868"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"J.H.","ce:indexed-name":"Friedman J.H.","ce:surname":"Friedman"},{"@seq": "2", "ce:initials":"J.L.","ce:indexed-name":"Bentley J.L.","ce:surname":"Bentley"},{"@seq": "3", "ce:initials":"R.A.","ce:indexed-name":"Finkel R.A.","ce:surname":"Finkel"}]},"ref-sourcetitle":"ACM Transactions on Mathematical Software","ref-publicationyear":{"@first": "1977"},"ref-volisspag":{"voliss":{"@issue": "3", "@volume": "3"},"pagerange":{"@first": "209", "@last": "226"}}},"ref-fulltext":"Friedman J.H., Bentley J.L., Finkel R.A. An algorithm for finding best matches in logarithmic expected time. ACM Transactions on Mathematical Software 1977, 3(3):209-226. 10.1145/355744.355745."},{"@id": "22", "ref-info":{"ref-title":{"ref-titletext":"On building fast kd-trees for ray tracing, and on doing that in O(N log N)"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"33748555783"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"I.","ce:indexed-name":"Wald I.","ce:surname":"Wald"},{"@seq": "2", "ce:initials":"V.","ce:indexed-name":"Havran V.","ce:surname":"Havran"}]},"ref-publicationyear":{"@first": "2006"},"ref-volisspag":{"pagerange":{"@first": "61", "@last": "69"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"doi:10.1109/RT.2006.280216"}},"ref-text":"IEEE Symposium on Interactive Ray Tracing"},"ref-fulltext":"I. Wald, V. Havran, On building fast kd-trees for ray tracing, and on doing that in O(N log N), in: IEEE Symposium on Interactive Ray Tracing 2006, pp. 61-69. doi:10.1109/RT.2006.280216."},{"@id": "23", "ref-info":{"ref-title":{"ref-titletext":"The quadtree and related hierarchical data structures"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0021644214"}},"ref-authors":{"author":{"@seq": "1", "ce:initials":"H.","ce:indexed-name":"Samet H.","ce:surname":"Samet"}},"ref-sourcetitle":"ACM Computer Survey","ref-publicationyear":{"@first": "1984"},"ref-volisspag":{"voliss":{"@issue": "2", "@volume": "16"},"pagerange":{"@first": "187", "@last": "260"}}},"ref-fulltext":"Samet H. The quadtree and related hierarchical data structures. ACM Computer Survey 1984, 16(2):187-260. 10.1145/356924.356930."},{"@id": "24", "ref-info":{"ref-title":{"ref-titletext":"Collision detection and response for computer animation"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0001157033"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"M.","ce:indexed-name":"Moore M.","ce:surname":"Moore"},{"@seq": "2", "ce:initials":"J.","ce:indexed-name":"Wilhelms J.","ce:surname":"Wilhelms"}]},"ref-sourcetitle":"Proceedings of the 15th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '88","ref-publicationyear":{"@first": "1988"},"ref-volisspag":{"pagerange":{"@first": "289", "@last": "298"}},"ref-text":"ACM, New York, NY, USA"},"ref-fulltext":"Moore M., Wilhelms J. Collision detection and response for computer animation. Proceedings of the 15th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '88 1988, 289-298. ACM, New York, NY, USA. 10.1145/54852.378528."},{"@id": "25", "ref-info":{"ref-title":{"ref-titletext":"Fast interference check method using octree representation"},"refd-itemidlist":{"itemid":{"@idtype": "SGR", "$" :"0024937625"}},"ref-authors":{"author": [{"@seq": "1", "ce:initials":"H.","ce:indexed-name":"Noborio H.","ce:surname":"Noborio"},{"@seq": "2", "ce:initials":"S.","ce:indexed-name":"Fukuda S.","ce:surname":"Fukuda"},{"@seq": "3", "ce:initials":"S.","ce:indexed-name":"Arimoto S.","ce:surname":"Arimoto"}]},"ref-sourcetitle":"Advanced Robotics","ref-publicationyear":{"@first": "1988"},"ref-volisspag":{"voliss":{"@issue": "3", "@volume": "3"},"pagerange":{"@first": "193", "@last": "212"}},"ref-website":{"ce:e-address":{"@type": "url", "$" :"http://www.ingentaconnect.com/content/vsp/arb/1988/00000003/00000003/art00003"}}},"ref-fulltext":"Noborio H., Fukuda S., Arimoto S. Fast interference check method using octree representation. Advanced Robotics 1988, 3(3):193-212. http://www.ingentaconnect.com/content/vsp/arb/1988/00000003/00000003/art00003, 10.1163/156855389X00091."},{"@id": "26", "ref-info":{"ref-title":{"ref-titletext":{"sup":"*"}]}}}}}}"""

results = json.loads(text)

print(json.dumps(results,
             sort_keys=True,
             indent=4, separators=(',', ': ')))

我收到以下错误:

Traceback (most recent call last):
  File "./scopus_api.py", line 11, in <module>
    results = json.loads(text)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/decoder.py", line 359, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting ',' delimiter: line 1 column 23632 (char 23631)

我发现在大多数情况下,当字符串出现问题时会出现这种类型的错误,但是我检查了字符串,而字符23630(在vim中)只显示了一个普通字符。所以我不知道字符串有什么问题。我找到了this one这样的帖子,但它们并没有真正帮助。

2 个答案:

答案 0 :(得分:3)

您的JSON无效。您可以尝试this非常有用的资源,它可以向您显示JSON文件中的错误。使用&#34;验证JSON&#34; ,找到错误应该没有问题。只需复制/粘贴两个"""之间的JSON即可。

答案 1 :(得分:1)

最后有一个糟糕的结束括号:

...f-title":{"ref-titletext":{"sup":"*"}]}}}}}}"""
            ^                ^         ^^
            |                \---------/|
            \---------------------------/
相关问题