Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 파이썬
- 현대sw
- 다트
- DART
- java
- aws
- 개발
- 백준
- 코테
- 아마존 웹 서비스
- 머신러닝
- 스위프트
- 프로그래머스
- 자바
- programers
- 코틀린
- baekjoon
- 알고리즘
- SWIFT
- Python
- Flutter
- GDSC
- 안드로이드
- 소프티어
- VSCode
- 플러터
- MVVM
- kotlin
- softeer
- Android
Archives
- Today
- Total
조준장 개발자 생존기
[Flutter - Error] Unhandled Exception: FormatException: Unexpected character (at character 1) 본문
Develop/Flutter
[Flutter - Error] Unhandled Exception: FormatException: Unexpected character (at character 1)
JunJangE 2022. 1. 1. 15:16xml을 파싱하는 과정에서 뜬 에러이다.
var body = await json.decode(response.body);
print(body);
위 코드를 다음 코드로 수정하면 에러가 사라진다.
var body = utf8.decode(response.bodyBytes);
print(body);
그런데 "Unhandled Exception: type 'String' is not a subtype of type 'List <dynamic>' in type cast" 에러와 같이 한글이 깨지는 것을 확인할 수 있었다.
한글이 깨지는 경우는 다음 링크를 통해 해결해보자.
[Flutter - Error] Unhandled Exception: type 'String' is not a subtype of type 'List<dynamic>' in type cast => xml 파싱 중 한
xml 파싱 중 한글이 깨지는 상황이 생길 수 있다. var body = await json.decode(json.encode(response.body)); print(body); 위 코드를 사용해서 한글이 깨질 경우에는 다음 코드를 통해 해결하자. var body = ut..
fre2-dom.tistory.com
'Develop > Flutter' 카테고리의 다른 글
[Flutter] 플러터 Provider로 공공데이터 오픈 API 활용 (0) | 2022.01.05 |
---|---|
[Flutter - Error] Unhandled Exception: type 'String' is not a subtype of type 'List<dynamic>' in type cast => JSON 파싱 중 한글 깨짐 (0) | 2022.01.01 |
[Flutter] 플러터 MultiProvider를 통해 BottomNavigationBar 구현 (0) | 2021.12.30 |
[Flutter] 플러터 Bloc 패턴 구현 (0) | 2021.12.27 |
[Flutter - Error] INSTALL_FAILED_INSUFFICIENT_STORAGE (0) | 2021.12.24 |