I have a two-way binding on the points property of a go.Link:
new go.Binding("points", "goPoints").makeTwoWay(),
It works perfectly well when I reshape the links.
However, when I draw a new link using the linking tool, the value I get in goPoints is undefined. Only when I reshape the link do I get a proper value.
I just tried a sample using exactly the same Binding as your link template uses, and the newly drawn link data’s data.goPoints property got set to a List of Points, exactly as it should.
Of course I am unable to call Model.toJson on this model, since it cannot know how to serialize List values in model data. Model.toJson only handles Lists of Points when the property name is “points”.
My problem was actually that my goPoints setter was using the link’s from which may not yet be set at the time the link is drawn: the binding is executed a first time when the link is drawn (before it was even connected to any node-- points is undefined at that time) and a second time when the route of that link was determined (points has a proper value).