javascript - Why can't SignalR model passed to client be parsed like JSON? -


it hard word question, let's hope detailed explanation better!

i have signalr set have struct i'm passing client each time game board updates.

that object is:

public struct updatemodelmini     {         public bool ismatchupover;         public int player1wins;         public int player2wins;         public timespan timeleft;     } 

of updatemodelmini can parsed on client side json object:

updateboardmodel.ismatchupover etc... 

the problem can't seem recognize "parts" of system.timespan object provided .net

where

updatemodelmini.timeleft.timeleft 

returns: 00:00:15

updatemodelmini.timeleft.timeleft.seconds 

...returns undefined

i'm sure there's simple trick here object exposed hub , consequently client, can't seem find via google...

do need create own [public] object model store timespan object? encountered this?


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -