I´m doing a wrap for the Dropbox V2 SDK.
When i request a filelist for ex. i get an Metadata object for each file.
So far ok and works... But if i do a log(meta.tostring) in B4A i get the following log...
As you can see there is a ".tag" inside the output...
tostring is a method i wrapped... the lib behind will send a json result with it.
For now i use this and take a jsonparser to get the result of the .tag... It is working but i think it should be better to do this step inside the wrapper.
How can i access this tag?
Here i can distinguish files from folders in theresultlist... The .tag is "file" or "folder"
When i request a filelist for ex. i get an Metadata object for each file.
B4X:
public class MetadataWrapper extends AbsObjectWrapper<Metadata> {
private BA ba;
private String eventName;
@Hide
public void Initialize(final BA ba, Metadata meta) {
this.ba = ba;
final Metadata _obj = meta;
setObject(_obj);
}
public String getName(){
return getObject().getName();
}
public String getParentSharedFolderId(){
return getObject().getParentSharedFolderId();
}
public String getPathLower(){
return getObject().getPathLower();
}
public String getPathDisplay(){
return getObject().getPathDisplay();
}
public String toString(){
return getObject().toString();
}
public String toStringMultiline(){
return getObject().toStringMultiline();
}
}
So far ok and works... But if i do a log(meta.tostring) in B4A i get the following log...
{".tag":"folder","name":"Manfred","id":"id:qn6VkEYC6_gAAAAAAAAq7Q","path_lower":"/manfred","path_display":"/Manfred","shared_folder_id":"1295544397","sharing_info":{"read_only":false,"shared_folder_id":"1295544397","traverse_only":false,"no_access":false}}
As you can see there is a ".tag" inside the output...
tostring is a method i wrapped... the lib behind will send a json result with it.
For now i use this and take a jsonparser to get the result of the .tag... It is working but i think it should be better to do this step inside the wrapper.
How can i access this tag?
Here i can distinguish files from folders in theresultlist... The .tag is "file" or "folder"
Last edited: