(bug 51493) handle invalid json snak data in SetReference api module

Change-Id: I72f9410642edcca9fe2459b325726e979ec4d814