대역폭을 절약하기 위해 POST 방식으로 gzipped 데이터를 전송하는 WebApi 및 클라이언트로 서비스를 개발합니다. 둘 다 내 통제하에있다. 서버에서 나는, 압축 된 데이터를 수신 압축을 해제와 같은 문자열이 있습니다ASP.NET WebApi form-urlencoded string deserialize
section[0][caption]=Foo&
section[0][address]=175896&
section[0][counters][]=2&
section[0][counters][]=2&
section[0][errors][]=ERR_NOT_AVAILABLE&
errors=true&
trmtimestamp=1346931864358
즉 간단한 www가 형태 - urlencoded를 문자열입니다.
ASP.NET MVC4 WebApi에이 문자열을 내 모델에 바인딩하거나 역 직렬화 할 수있는 방법이 있습니까?
public class Snapshot
{
public List<SectionState> sections { get; set; }
public bool errors { get; set; }
public double date { get; set; }
public double trmtimestamp { get; set; }
}
'SectionState'는 일종의 키/값 쌍입니까? – Chris
@Chris 아니, 그건 간단한 클래스'{문자열 캡션, int 주소, int [] 카운터, 문자열 [] 오류)' –