을 역 직렬화 할 수없는 나는 다음과 같은 클라이언트 코드가 : 클라이언트가이 직렬화 할 수Websharper 노조 유형
type Command =
| CreateBug of string
| Query of Query * AsyncReplyChannel<string>
[<Rpc>]
let SendCommand cmd =
dispatcher.Post cmd
: [{ "$"여기
|>! OnClick (fun _ _ -> Server.CreateBug input.Value |> Server.SendCommand)
이 유형 및 서버 코드의 : 0, "$ 0": "테스트"}]
그러나 나는 다음과 같은 로그 오류 디버깅을 얻을 :
WebSharper.Web Error: 0 : Failed to execute a remote call. Failed to get JSON deserializer for: ClientReferral.Server+Command[]
WebSharper Error: 0 : Failed to execute a remote call. Failed to get JSON deserializer for: ClientReferral.Server+Command[]
이 코드는 다소 사소한 것으로 WebSharper 설명서에서 작동하지 않는다는 것을 나타내는 것은 아닙니다. 나는 그것을 그렇게 사용하는 것을 기억한다. 그래서 나는 틀린 것을 모른다.
편집
:type Query =
| GetBugs
| GetBugInfo of int
'Query of Query'는 'Query of Command'입니까? – ildjarn
기본적으로 서버에 명령 또는 쿼리를 보내려합니다. 쿼리는 일반적으로 ReplyChannel을 사용하여 명령에 래핑되어 에이전트에 전달됩니다. –