Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.51 KB | None | 0 0
  1. ➜  src cat App/Program.fs
  2. open System
  3. open Library
  4.  
  5. [<EntryPoint>]
  6. let main argv =
  7.     printfn "Nice command-line arguments! Here's what JSON.NET has to say about them:"
  8.  
  9.     argv
  10.     |> Array.map getJsonNetJson
  11.     |> Array.iter (printfn "%s")
  12.  
  13.     0 // return an integer exit code
  14.  
  15. ➜  src cat Library/Library.fs
  16. module Library
  17.  
  18. open Newtonsoft.Json
  19.  
  20. let getJsonNetJson value =
  21.     sprintf "I used to be %s but now I'm %s thanks to JSON.NET!" value (JsonConvert.SerializeObject(value))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement