Python的json.loads()参数中包含两个反斜杠怎么解决,希望结果能格式化成一个反斜杠

CSDN问答 2021-11-22 11:23:48
Python json 参数 json.loads loads

x = b'{
"a":"\\\\"}'y = b'{
"b":"shterm\\1"}'print(json.loads(x))print(json.loads(y))



参考答案1:

json中的字符是以字符串的形式读取的。你可能需要对读取的对象中的字符串进行进一步处理才行。




参考答案2:
版权声明
本文为[CSDN问答]所创,转载请带上原文链接,感谢
https://ask.csdn.net/questions/7575314

  1. 請教一下這個 python homework,求幫幫我吖
  2. S'il vous plaît, parlez - moi de ce homework Python.
  3. Analyse de la distribution des tremblements de terre au cours des 10 dernières années par Python
  4. How to remove Nan when merging two columns in Python
  5. Problems about inheritance errors in Python
  6. Python QT GUI Design: qtabwidget, qstackedwidget and qdockwidget container control classes (promotion chapter-2)
  7. Les fonctions Python utilisent les paramètres de calcul et
  8. A struct in Python_ Object time1 of type time
  9. What code is used in Python to get the current time UTC
  10. Le thread 01 de Python connaît le thread
  11. I hope you can consult the exercises in Python
  12. Python interface automation -- Introduction to interface testing tools (detailed explanation)
  13. 在120篇系列专栏中,才能学会 python beautifulsoup4 模块,7000字博客+爬第九工场网
  14. Python interface automation - interface test case and interface test report template (detailed explanation)
  15. 2021 most complete Python interface test automation tutorial [quality article]
  16. Dans les 120 colonnes de la série, apprenez le module Python beautiful soup4, 7000 mots de blog + Grimpez au neuvième réseau d'ateliers
  17. Résoudre avec succès tensorflow.python.framework.errors Impl. Unimplementederror: Cast string to int32 is not support
  18. (Data science learning record 131) Summary of Common String Processing Methods in pandas
  19. Python asked, please help me, why the output has always been a share in Shanghai stock market
  20. Solve, python do 10:30 games
  21. pycharm的python解释器为什么全是红的?
  22. I just came into contact with Python. I want to ask you a question about python
  23. Pourquoi l'interpréteur Python de pycharm est - il tout rouge?
  24. Python circular string connection problem
  25. 一文读懂层次聚类(Python代码)
  26. Python手机抓包案例,用Charles捕获【春雨医生】接口数据
  27. Cas de capture de paquets par téléphone cellulaire Python, saisie des données d'interface [Dr Spring Rain] avec Charles
  28. Comprendre le regroupement hiérarchique (Code Python)
  29. Python writes a program to correct two errors in an English paragraph
  30. AttributeError:module 'pandas' has no attribute'DateFrame'
  31. Python exercises, (without functions)
  32. Python problem submission system just can't pass
  33. Python crawling 'innerHTML' does not match the web page
  34. Production of pollution rose chart and use of Python
  35. Input two sets X and y, how to output all x to y functions? (using Python)
  36. Python did 2048 games and copied the code wrong. What's wrong?
  37. Daily questions of a little Python white (づ● - ●)
  38. The problem of running Python's input function by vscade
  39. Python just learned Python using the for loop
  40. Daily questions of a little Python white (づ● - ●)
  41. Common algorithm design methods in Python
  42. Python 6.3 change problem, and then how many problems does this have?
  43. How does Python use the subplot function to generate the function diagram of leaky relu
  44. Python beginners ~ exercises left ~ nodding bald ~ no ideas ~ ask for guidance ~
  45. python爬虫:爬取某网站视频
  46. Now, what library is the best for Python to operate MySQL
  47. Why do you do this? No, No
  48. What is the difference between the two writing methods of importing Excel files from Python?
  49. Python crawler: ramper vers une vidéo de site Web
  50. Replacement of any string in Python
  51. Python runs without numpy. It is useless to uninstall and reinstall numpy and pandas
  52. National computer level II Examination for Python Programming
  53. Python reports an error yolov3 and takes over other people's AI projects
  54. Python programming to complete the calculation of investment years
  55. Can Python complete the propensity score matching of multiple groups of data?
  56. Django+Vue项目学习第一篇:django后台搭建
  57. 关于#python#的问题:requestes报错
  58. Django+Vue項目學習第一篇:django後臺搭建
  59. Django + vue Project Learning Part 1: Django background Building
  60. python中使用mnist数据集的问题