Joh*_*tin 1 .net f# visual-studio-2010 type-providers f#-data
I'm trying to compile simple example:
open Microsoft.FSharp.Data
type Simple = JsonProvider<""" { "name":"John", "age":94 } """>
let simple = Simple.Parse(""" { "name":"Tomas", "age":4 } """)
simple.Age
simple.Name
Run Code Online (Sandbox Code Playgroud)
I use MSVS 2010, .Net Framework 4.5.1 and FSharp.Data via nuget. But when I try to compile this example, I get error:
This token (<""", """>, (""") and """)) is reserved for future use.
How can I use F# Json Type Provider?
Dan*_*ian 10
Type providers are part of F# 3.0. Are you sure, you are using the F# 3.0 or F# 3.1 compiler? I thought Visual Studio 2010 came with F# 2.0.
I remember, that the """ strings were also added in F# 3.0
| 归档时间: |
|
| 查看次数: |
343 次 |
| 最近记录: |