JSON2 [node.js] msgpack5 사용 예 Node.js용 msgpack npm Json serialize / deserialize 가능 [코드] - msgpack5 사용 코드 간단 예 var msgpack = new require('msgpack5')() , encode = msgpack.encode , decode = msgpack.decode // object 생성 var testData = { name:'Tester' }; // serialize var buffer = msgpack.encode(testData); // deserialize var unpack = msgpack.decode(buffer); // name이 있기때문에 아래 코드 출력 if(unpack.hasOwnProperty('name') == true) console.l.. 2023. 5. 25. [C#] DateTime값 Serialization/Deserialization시 DateTime.Minvalue 수치 변하는 현상. 문제 ServiceStack을 사용하여 object를 json으로 serialization / deserialization 하면서 사용중인데, 분명히 DataTime.MinValue로 초기화(0001-01-01 00:00:00) 하여 저장한 변수인데, ToJson() 후 파싱하면 출력되는 값이 0001-01-01 09:00:00 으로 변경 되어 출력되는 문제가 있었다. 찾아보니 "The TimeZone when serializing into a DateFormat that includes the TimeZone is the local timezone of the computer serializing the date. " "TimeZone을 포함하는 DateFormat으로 직렬화할 때 TimeZone은 날.. 2022. 12. 16. 이전 1 다음 반응형