Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007824opensim[REGION] Script Functionspublic2016-01-27 06:362019-10-29 11:27
Reporterdjphil 
Assigned Todjphil 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPCOperating SystemWindowsOperating System VersionSeven
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007824: OSSL json functions return System.Collections.Hashtable
DescriptionToday i continue to test the http request / responses etc ...

I try to use the github API v3 to get opensim commits from here :
https://api.github.com/repos/opensim/opensim/commits [^]
(This page return JSON datas)

To parse these datas i use osParseJSON or osParseJSONNew
but allways return "System.Collections.Hashtable"

or

[06:59] System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> OpenSim.Region.ScriptEngine.Shared.ScriptException: OSSL Runtime Error: osParseJSONNew: Problems decoding JSON string [{"sha":"15af6265a1853bb9abe49071717f4102ceac8e01","commit":{"author":{"name":"Jak Daniels","email":"jak@ateb.co.uk","date":"2015-11-22T16:02:00Z"},"committer":{"name":"UbitUmarov","email":"ajlduarte@sapo.pt","date":"2015-11-22T17:30:08Z"},"message":"Fixed some stupid math and checks on --bounding-origin and --bounding-size. Bounding origin can of course be negative if it needs to be as we're taking stuff from the (possibly rotated) source region. Bounding size must always be >=0 and <= destination region size.\n\nSigned-off-by: UbitUmarov <ajlduarte@sapo.pt>","tree":{"sha":"680ad29b1ab8d21e2115bab1d8c03c2b08d29c26","url":"https://api.github.com/repos/opensim/opensim/git/trees/680ad29b1ab8d21e2115bab1d8c03c2b08d29c26"},"url":"https://api.github.com/repos/opensim/opensim/ [^]

and console say : http://pastebin.com/xmR6UtfK [^]

What's happening, a bug ?
Steps To Reproducestring jsonURL = "https://api.github.com/repos/opensim/opensim/commits"; [^]
integer length = 10000;

default
{
    state_entry()
    {
        llHTTPRequest(jsonURL, [HTTP_METHOD, "GET", HTTP_BODY_MAXLENGTH, length], "");
    }

    http_response(key qid, integer status, list metadata, string body)
    {
        // if (status == 200) {;}
        llOwnerSay("[JSON OLD] " + osParseJSON(body));
        llOwnerSay("[JSON NEW] " + osParseJSONNew(body));
    }

    touch_start(integer n)
    {
        llHTTPRequest(jsonURL, [HTTP_METHOD, "GET", HTTP_BODY_MAXLENGTH, length], "");
    }
}
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script Engine
Environment.NET / Windows32
Mono VersionNone
ViewerFirestorm, Singularity
Attached Files

- Relationships

-  Notes
(0030029)
djphil (reporter)
2016-01-27 07:36

I have isoled a single commits from https://developer.github.com/v3/repos/commits/ [^] to a text file on my server and make some test with him.

I note that because of the new body max length limitation, it is not even possible to read only 1 complete github commit !!!

It's truly sad ...
(0035799)
djphil (reporter)
2019-10-29 11:27

As osParseJSON and osParseJSONNew have been removed, this mantis is no longer relevant.

- Issue History
Date Modified Username Field Change
2016-01-27 06:36 djphil New Issue
2016-01-27 06:59 djphil Description Updated View Revisions
2016-01-27 07:04 djphil Description Updated View Revisions
2016-01-27 07:36 djphil Note Added: 0030029
2019-10-29 11:27 djphil Note Added: 0035799
2019-10-29 11:27 djphil Status new => resolved
2019-10-29 11:27 djphil Fixed in Version => master (dev code)
2019-10-29 11:27 djphil Resolution open => fixed
2019-10-29 11:27 djphil Assigned To => djphil
2019-10-29 11:27 djphil Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker