有人可以解释一下我做错了吗?
使用JsonProvider时收到以下异常消息:
System.Exception:从字符0开始的无效JSON,snippet =
json =
我的代码如下:
open FSharp.Data
type MovieProvider = JsonProvider<"https://facebook.github.io/react-native/movies.json">
let result = MovieProvider.Parse "https://facebook.github.io/react-native/movies.json"
执行此行时抛出异常:
let result = MovieProvider.Parse "https://facebook.github.io/react-native/movies.json"
注:
我引用了这个documentation。
答案 0 :(得分:1)
您正在尝试将URL解析为JSON。您可能需要MovieProvider.Load
。