Форум сайта python.su
Привет, возможно ли конвертировать большое количество png файлов в json ?
Офлайн
VANISHED
Отредактировано ntram (Окт. 13, 2022 15:40:27)
Офлайн
ntram
никак он не представляет, это бот
Офлайн
Niki34567Преобразуй их в base64 и вставь в JSON-документ.
возможно ли конвертировать большое количество png файлов в json ?
ntram
Как Вы себе это представляете?
[
{
"name": "smile.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADYUExURWJiYv7xQ0ZGRioqKiQaAP/te//gAPeiAP7uZP7lAP/YAPz8Ef/UAP31Kv+zAP7qADcuFf+6APOgAP3yAP/dAP33AP/MAP/VZemdAP3yAf+sAP/eQsaHAP7sEf30Ef/gY//DIP/VVtaeLkM9If7MYv31Jv/jVv/AEf7tKt6jMeCpAOXNJ/GfAP/BAPz5AOfQOf7jGfikAP/dAf/he/33Af7kEf/FKv/aEf/IRv/FPv7lAv7xYv/WCv/jDvixKuSkGfW5Rf7qAuOgDvmqEf/cKuKbAAAAAP///7GsR/gAAABIdFJOU///////////////////////////////////////////////////////////////////////////////////////////////AJzs8mAAAACwSURBVHjaVM9FFsMwDARQBxpmhqbMzMytlfvfqHbSTedpob/SCOU0QFNsiKqd9urNowWlYS5VSNbhEKhhLJ0RkhAKOy0gthiGYVky6eFh5QgWA13nODKf3e0OCK5ZTVXVWrbd998vYsHs+jPfNQWtIWJiT4aN65qyd4EJtSLIEMfP0wqSiDjnFU8o+hkO5un9UaApWjA1RFyFoh+2bdtIHMqyP78UnQjzv/5//30FGACrUSaRymhFqgAAAABJRU5ErkJggg=="
},
{
"name": "neutral.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADAUExUReKbAP+6AP/te//VZf7uZP7qAP31Kvz8Ef/UAP7xQ//dADcuFQAAAPeiAP/BAP+zAP/gAP3xAP7lACQaAOmdAP33AP3sEf6sAPOgAGJiYkZGRioqKv/MAP/YAMaHAP30Ed6jMf/FPvGfAOSkGf/AEf/aEf/eQuXNJ+fQOfmqEf/FKv/bKv/jDv7tKkM9If7xYvikAPixKv/gY//jVvW5RdaeLv/JRv/VVuCpAPz6AP7jEf7jGf/he/7MYuOgDgAAAPxaS3UAAABAdFJOU////////////////////////////////////////////////////////////////////////////////////wDCe7FEAAAAr0lEQVR42lTPRxaDMAwEUBFwaAJseg2ppPdeuf+tYkM2maeF/kojqEVQpNlAaFMdD9eBia1xpnR4XnIfhXGqbJNESRL5fUZuU9f1NOVTXU5mDfhcd7tZxme52I8QcBWWqqqW4WMynn+4KWHBPWCEapIF3IZLGGPENXJnKFxQlzR97Mjnrr3CoJQahe3E4In7t1wrtNx2LOhh0w8kSXKiWLDt7+2s2Afv1//vv68AAwCBkRl5X4fkoAAAAABJRU5ErkJggg=="
},
{
"name": "sad.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADAUExURfWhAAAAAP/mPeKbAP/te//VZf7zRv31Kvz8Ef7qAP/jYzcuFf/dAP/VAP3xAP/gAP+6AP+zAP7lACQaAP7xYv/uZOmdAP33AP3sEf6sACoqKkZGRv/MAP+/AMaHAP30Ef/YAPikAP/he//AEf/EAOXNJ+fQOf/FKvmqEf/cKkM9If7tKt6jMfW5Rf/fEPixKv/FPv/jVvKgAOSkGf/JRv/aRv/VVtaeLv36AP7kEf7jGf7MYuOgDuCpAP7rYgAAADOroP0AAABAdFJOU////////////////////////////////////////////////////////////////////////////////////wDCe7FEAAAAsklEQVR42lTPxxaCMBAF0IyxEEoSCCAoSLD3gr3y/39lAm58ZxZzV/MGlTqgU21Ia9k4mJe9BbVhGjRVhq01aMMk8H0/+Jit5xWUrUa73e+rOZ82Vongsep0ej01i9nuCAjuUWYYRhbdt6P5S5kR2r11KWEOz7Gy7RFKKfHsxC20JfNI1SeNQ+VSSBsYs+UYEBb6/jtxpJOkLsIDqPphzrkbF5p1f5GjIsTi1//vv68AAwDmWxiOcRdkHQAAAABJRU5ErkJggg=="
}
]
Офлайн