json
-
Fsharp.Data (F# Data) Json parsing exampleF# 2016. 10. 20. 00:50
#1. set of properties { "a" : "apple", "b" : "banana", "c" : "cocoa" } open FSharp.Data open FSharp.Data.JsonExtensions [] let main argv = let json_txt= """{"a":"apple","b":"banana","c":"cocoa"}""" JsonValue.Parse(json_txt).Properties |> Array.iter(fun (key,value) -> printfn "%s:%s" key (value.AsString())) 0 // return an integer exit code #2. array of values ["apple","banana","cocoa"] open FShar..
-
구글 플러스 초간단 access token 체크 방법ETC 2016. 1. 12. 11:00
모바일 앱 클라이언트등에서 구글 플러스 인증을 통해 얻은 access token의무결성을 "최대한 간단하게" 검증해 보자.(2016년 1월 작동을 테스트 하였다.) 요약- 구글 api library를 사용하지 않는다. (아 진짜 복잡해서 못 써먹겠네)- 순수 웹 요청과 access_token만으로 인증 체크를 한다. 요청https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ABCDE 성공시 받는 json 응답{ "issued_to": "612345~~.com", "audience": "612345~~.com", "user_id": "1~~~~~~9", "scope": "https://www.googleapis.com/auth/userinfo.email..