System.FormatException при передаче JSON - C#
Формулировка задачи:
Передаю строку с json ответом в процедуру и в итоге получаю ошибку "Входная строка имела неверный формат."
Выглядит это примерно так
содержание answer
procedure(Encoding.ASCII.GetString(byte[] answer))
{"server":631227,"photo":"[{"photo":"8fbc038174:w","sizes":[["s","631227852","5fdce","sDEfKiKXavg",54,75], ["m","631227852","5fdcf","FVrYftJo0bI",93,130],["x","631227852","5fdd0","8qGQghd3Oqw",430,604], ["y","631227852","5fdd1","QEvIU3YfF-k",575,807],["z","631227852","5fdd2","YNOGWtCf9WI",770,1080], ["w","631227852","5fdd3","T-_zmF-3tTo",1000,1402],["o","631227852","5fdd4","ieRi0HU8TRg",130,183], ["p","631227852","5fdd5","FHzJaiZn8vI",200,281],["q","631227852","5fdd6","etZVRYrA5nU",320,449], ["r","631227852","5fdd7","MVN6Bxg5HHc",510,715]], "kid":"affa1004c2c3dd219666a55ab4de55e4","debug":"xswmwxwywzwwwowpwqwrw"}]","hash":"e148ddff6c1166399f1e3d82f58d1d39"}
Решение задачи: «System.FormatException при передаче JSON»
textual
Листинг программы
{ "server":631227, "photo": [ { "photo":"8fbc038174:w", "sizes": [ ["s","631227852","5fdce","sDEfKiKXavg",54,75], ["m","631227852","5fdcf","FVrYftJo0bI",93,130], ["x","631227852","5fdd0","8qGQghd3Oqw",430,604], ["y","631227852","5fdd1","QEvIU3YfF-k",575,807], ["z","631227852","5fdd2","YNOGWtCf9WI",770,1080], ["w","631227852","5fdd3","T-_zmF-3tTo",1000,1402], ["o","631227852","5fdd4","ieRi0HU8TRg",130,183], ["p","631227852","5fdd5","FHzJaiZn8vI",200,281], ["q","631227852","5fdd6","etZVRYrA5nU",320,449], ["r","631227852","5fdd7","MVN6Bxg5HHc",510,715] ], "kid":"affa1004c2c3dd219666a55ab4de55e4", "debug":"xswmwxwywzwwwowpwqwrw" } ], "hash":"e148ddff6c1166399f1e3d82f58d1d39" }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д