2.0 bet edit document shows base64 string for json document which was added with .net client
When i add json documents with:
The Couchbase web admin client shows:
baccaratTable_1 { "ownerID": 1, "tableExpires": "2015-06-16T14:26:48.4577741-07:00", "tablePlayers": null,
baccaratTable_634837732125761813 { "ownerID": 634837732125761800, "tableExpires": "2015-06-16T14:28:55.1767951-07:00", "tablePlayers": null,
But when i click on the Edit document i see:
"eyJvd25lcklEIjoxLCJ0YWJsZUV4cGlyZXMiOiIyMDE1LTA2LTE2VDE0OjI2OjQ4LjQ1Nzc3NDEtMDc6MDAiLCJ0YWJsZVBsYXllcnMiOm51bGwsImlzTGl2ZSI6ZmFsc2UsImlzUm9ib3RpYyI6dHJ1ZSwiYmV0TWluIjoxLCJiZXRNYXgiOjEwMCwiQ291bnRyeSI6IjEiLCJMb2NhdGlvbiI6IkxhZ3VuYSIsInR5cGUiOiJiYWNjYXJhdFRhYmxlIiwicmV2IjoiXCIyMDEyLTA5LTIwVDE0OjI2OjQ4LjUwNDU3NDItMDc6MDBcIiIsIl9pZCI6bnVsbCwiY3JlYXRlZFRpbWUiOiIyMDEyLTA5LTIwVDE0OjI2OjQ4LjQ1Nzc3NDEtMDc6MDAifQ=="
In the previous version this didn't happen!
I am using the latest source from: https://github.com/couchbase/couchbase-net-client
And the C# code that i use on Windows Server 2008 which has the couchbase server running on the same localhost machine is:
var user = new FbUser
{
//Id = key,
UserId = id,
IsDealer = isdealer,
IsRobot = isrobotic,
Owe = 0,
Owes = 0,
UserName = String.IsNullOrEmpty(userName) ? id.ToString() : Util.Truncate(userName, 50).Trim(),
Bookmark = false,
IsFan = false,
Note = strnote,
UserPin = pin,
Email = Util.Truncate(stremail, 150).Trim(),
IsAppUser = appuser,
Thumbnail = Util.Truncate(strthumbnail, 250),
Credits = isdealer ? Convert.ToDecimal(ConfigurationManager.AppSettings["NewDealerFreeChips"]) : Convert.ToDecimal(ConfigurationManager.AppSettings["NewUserFreeChips"]),
AccessToken = Util.Truncate(token, 256),
ActivationKey = Util.Truncate(activationKey, 250),
DeviceId = Util.Truncate(deviceId, 128),
DeviceModel = Util.Truncate(sysModel, 50),
DeviceType = Util.Truncate(sysVer, 50),
CreatedTime = DateTime.Now
};
Entities.Couchbase.couchbaseClient.StoreJson(StoreMode.Set, user.Type + "_" + id, user);
and the FBUser class is:
public abstract class ModelBase
{
[JsonProperty(PropertyName = "_id")]
public string Id { get; set; }
[JsonProperty("type")]
public abstract string Type { get; }
[JsonProperty(PropertyName = "rev")]
public abstract string Rev { get; }
[JsonProperty(PropertyName = "createdTime")]
public System.DateTime CreatedTime { get; set; }
}
public class FbUser : ModelBase
{
public override string Type { get { return "fbUser"; } }
public override string Rev { get { return JsonConvert.SerializeObject(DateTime.Now, new IsoDateTimeConverter()); } }
[JsonProperty(PropertyName = "userId")]
public long UserId { get; set; }
[JsonProperty(PropertyName = "loginDate")]
public System.DateTime LoginDate { get; set; }
[JsonProperty(PropertyName = "credits")]
public decimal Credits { get; set; }
[JsonProperty(PropertyName="bookmark")]
public bool Bookmark { get; set; }
[JsonProperty(PropertyName="note")]
public string Note { get; set; }
[JsonProperty(PropertyName="owe")]
public decimal Owe { get; set; }
[JsonProperty(PropertyName="owes")]
public decimal Owes { get; set; }
[JsonProperty(PropertyName="userName")]
public string UserName { get; set; }
[JsonProperty(PropertyName = "userPin")]
public string UserPin { get; set; }
[JsonProperty(PropertyName="isFan")]
public bool IsFan { get; set; }
[JsonProperty(PropertyName="fbSession")]
public string FbSession { get; set; }
[JsonProperty(PropertyName="deviceId")]
public string DeviceId { get; set; }
[JsonProperty(PropertyName="deviceType")]
public string DeviceType { get; set; }
[JsonProperty(PropertyName="deviceModel")]
public string DeviceModel { get; set; }
[JsonProperty(PropertyName="deviceBrand")]
public string DeviceBrand { get; set; }
[JsonProperty(PropertyName="clientIP")]
public string ClientIp { get; set; }
[JsonProperty(PropertyName="clientBrowser")]
public string ClientBrowser { get; set; }
[JsonProperty(PropertyName="activationKey")]
public string ActivationKey { get; set; }
[JsonProperty(PropertyName="fbSessionSecret")]
public string FbSessionSecret { get; set; }
[JsonProperty(PropertyName="isAppUser")]
public bool IsAppUser { get; set; }
[JsonProperty(PropertyName="email")]
public string Email { get; set; }
[JsonProperty(PropertyName="thumbnail")]
public string Thumbnail { get; set; }
[JsonProperty(PropertyName="tableSeatedID")]
public long TableSeatedId { get; set; }
[JsonProperty(PropertyName="tableSeatNo")]
public int TableSeatNo { get; set; }
[JsonProperty(PropertyName="tableExpires")]
public System.DateTime TableExpires { get; set; }
[JsonProperty(PropertyName="player1ID")]
public long Player1Id { get; set; }
[JsonProperty(PropertyName="player2ID")]
public long Player2Id { get; set; }
[JsonProperty(PropertyName="player3ID")]
public long Player3Id { get; set; }
[JsonProperty(PropertyName="sessionPnL")]
public decimal SessionPnL { get; set; }
[JsonProperty(PropertyName="weeklyPnL")]
public decimal WeeklyPnL { get; set; }
[JsonProperty(PropertyName="monthlyPnL")]
public decimal MonthlyPnL { get; set; }
[JsonProperty(PropertyName="pnLYtd")]
public decimal PnLYtd { get; set; }
[JsonProperty(PropertyName="pnLLifetime")]
public decimal PnLLifetime { get; set; }
[JsonProperty(PropertyName="pnLDaily")]
public decimal PnLDaily { get; set; }
[JsonProperty(PropertyName="accessToken")]
public string AccessToken { get; set; }
[JsonProperty(PropertyName="disableADs")]
public bool DisableADs { get; set; }
[JsonProperty(PropertyName="enableCMS")]
public bool EnableCms { get; set; }
[JsonProperty(PropertyName="enablePAN")]
public bool EnablePan { get; set; }
[JsonProperty(PropertyName = "isDealer")]
public bool IsDealer { get; set; }
[JsonProperty(PropertyName = "isRobot")]
public bool IsRobot { get; set; }
}
How to get this fixed so that I can edit the documents using the web admin UI?
Thanks in advance