Get Why is change the data type?

Hello Brett.

Help to understand the anomaly.
Executing the following code:

$res = $cbBucket->get($cbGet);

echo "\r\n<hr><b>cbGet res</b><br>";

data type of "value"
On Monday object(stdClass):

cbGet res
object(CouchbaseMetaDoc)#16 (4) { ["error"]=> NULL ["value"]=> object(stdClass)#8 (5) { ["docId"]=> string(24) "062e186f1b210e49d17a914a" ["createdAt"]=> int(1454140186) ["updatedAt"]=> int(1454266897) ["userEmail"]=> string(19) "" ["userPassword"]=> string(8) "Password" } ["flags"]=> int(33554438) ["cas"]=> resource(7) of type (CouchbaseCAS) }

On Tuesday string:
cbGet res
object(CouchbaseMetaDoc)#12 (4) {
string(142) “{“docId”:“eded5a6cc3ec348e767084d2”,“createdAt”:1454390234,“updatedAt”:1454393253,“userEmail”:“”,“userPassword”:“Password”}”
resource(2) of type (CouchbaseCAS)

Why is change the data type?

Only time I’ve seen this, is if you edit a doc from the web admin it will also change the flag value.

Hey @Kozlov,

As @jarro has mentioned. If you modify the document in the Web UI, this can cause the flags meta-data for the document to be modified and this will cause the client to see the value as being a string rather than JSON.

Cheers, Brett

Thank you for your responses.
Correctly I understood:
Change the data type spit-only web interface ?:
Thank you.

So is there a way to prevent Web UI from modifying metadata? Or at least is there a way to force CB to return data in a given format (JSON or object)…

if you are talking about PHP clients, it does handle case with zero flags as JSON since 2.2.3

But the server still hasn’t fixed this issue