Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getfolder method response example not valid JSON. #30

Closed
mikhey opened this issue Oct 22, 2010 · 5 comments
Closed

getfolder method response example not valid JSON. #30

mikhey opened this issue Oct 22, 2010 · 5 comments

Comments

@mikhey
Copy link

mikhey commented Oct 22, 2010

I'm working on an ASP.Net connector and ran into an issue when attempting to reproduce the example/expected JSON string given in the ReadMe.txt file. The example response doesn't pass the JSON lint located at: http://www.jsonlint.com. I've taken a look at the JavaScript code and the key isn't being used specifically in the list (from what I could tell at this hour). They key being the absolute path to the file tends to be redundant to me as well. I have created code that omits that key but still returns a valid JSON array of objects which appears to be working at this time.

I would like to propose that new example code would be:

[
    {
        "Path": "/UserFiles/Image/logo.png",
        "Filename": "logo.png",
        "File Type": "png",
        "Preview": "/UserFiles/Image/logo.png",
        "Properties": {
            "Date Created": null,
            "Date Modified": "02/09/2007 14:01:06",
            "Height": 14,
            "Width": 14,
            "Size": 384 
        },
        "Error": "",
        "Code": 0 
    },
    {
        "Path": "/UserFiles/Image/icon.png",
        "Filename": "icon.png",
        "File Type": "png",
        "Preview": "/UserFiles/Image/icon.png",
        "Properties": {
            "Date Created": null,
            "Date Modified": "02/09/2007 14:01:06",
            "Height": 14,
            "Width": 14,
            "Size": 384 
        },
        "Error": "",
        "Code": 0 
    }
]

Does this work? I'm in early in my development of this connector at this point. I will "genericize" the code and pass it on to you guys for the community.

Regards,

-- Mikhey

@simogeo
Copy link
Owner

simogeo commented Oct 22, 2010

Hi mikhey,

Ok for double quotes wrapping keys!
But why are you repeting the code twice?


 {
        "Path": "/UserFiles/Image/icon.png",
        "Filename": "icon.png",
        "File Type": "png",
        "Preview": "/UserFiles/Image/icon.png",
        "Properties": {
            "Date Created": null,
            "Date Modified": "02/09/2007 14:01:06",
            "Height": 14,
            "Width": 14,
            "Size": 384 
        },
        "Error": "",
        "Code": 0 
    }

would be enough

@mikhey
Copy link
Author

mikhey commented Oct 22, 2010

Oh my bad on not changing the second record, the reason for the duplicate was because when querying getfolder, multiple results are returned in an array.

@simogeo
Copy link
Owner

simogeo commented Oct 22, 2010

ok

@simogeo
Copy link
Owner

simogeo commented Oct 31, 2010

by the way. ASP.NET connector already exists : http://forum.filemanager.corefive.com/topic/a-connector-for-asp-net#18308000000212001

@simogeo
Copy link
Owner

simogeo commented Jan 17, 2011

should be ok now

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants