public void DeseralizePostData(string data, ViewModelBase target, out Action invokedCommand)
        {
            // deserialize the changes into the view model
            var obj = JObject.Parse(data);
            var cvtr = new JsonSerializer();
            cvtr.Populate(obj["viewModel"].CreateReader(), target);

            // determine command info
            var commandName = obj["commandName"].Value<string>();
            var commandTarget = obj["commandTarget"].Value<string>();
            var commandArguments = cvtr.Deserialize<object[]>(obj["commandArguments"].CreateReader());

            // locate the method info
            invokedCommand = ResolveCommand(target, commandName, commandTarget, commandArguments);
        }
 public string SerializeViewModel(ViewModelBase viewModel)
 {
     return JsonConvert.SerializeObject(viewModel);
 }