简体   繁体   中英

F# JSON Type Provider error: This token is reserved for future use

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

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM