atifaziz / jayrock Goto Github PK
View Code? Open in Web Editor NEWJSON & JSON-RPC for .NET Framework & Mono
License: GNU General Public License v3.0
JSON & JSON-RPC for .NET Framework & Mono
License: GNU General Public License v3.0
Originally reported on Google Code with ID 9
Originally submitted at the old BerliOS bug database as bug #12270. For
details see:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=12270&group_id=4638
Reported by azizatif
on 2009-03-24 23:00:15
Originally reported on Google Code with ID 18
Quoted from issue posted on the discussion group by Chee Yee Cheong:
> I've created a handler inherited from
> JsonRpcHandler with a JsonRpcMethod
>
> [JsonRpcMethod()]
> public bool Save(string jobName, string pubDesc,
> string privDesc, string moreInfo, string location,
> string orgName, string orgWeb, int countryID,
> int durationID, int jobTypeID, int statusID,
> bool isSalaried, bool showCountryToPublic,
> int contactUserID, int postedByUserID, bool isPriority)
>
> When I pass string from a multi line textbox into pubDesc
> and privDesc, it throw an exception with the message
> "Unterminated string"
>
>
> var txt1 = document.getElementById("txt1").value
> var txt2 = document.getElementById("txt2").value
>
> serviceObj.Save("jobname", txt1, txt2, ...etc)
> This only happens with IE and only if I were to pass to
> both pubDesc and privDesc. Passing to only 1 of these does
> not produce an error.
>
> serviceObj.Save("jobname", txt1, "test",...etc)
> or
> serviceObj.Save("jobname", "test", txt2,...etc)
See the following thread for background and more:
http://groups.google.com/group/jayrock/t/ab7d7c8dce161d71
Use attachment for repro.
Reported by azizatif
on 2010-05-07 18:07:43
Originally reported on Google Code with ID 40
Most JSON-RPC client implementations dynamically generate their API according to what
is returned by system.listMethods. Therefore instead of this:
Console.WriteLine(client.Invoke("sum", new JsonObject { { "a", 123 }, { "b", 456 }
}));
... one simply does this:
Console.WriteLine(client.sum(123, 456));
.NET now has the ExpandoObject facility to allow runtime generation of methods. Having
JsonRpcClient make use of this would make life for user code much easier.
Thanks,
Niall
Reported by nialldouglas14
on 2011-07-20 15:09:25
Originally reported on Google Code with ID 45
What steps will reproduce the problem?
1.I have my iphone app.
I am using JSON-RPC for calling web service method
I am calling one method of my Json web service,
for that web service method I am sending json string as a parameter.
JSon string contains some special characters like £,™,å etc .
2.it will through a error since i am unable to call my method since jay rock fails
for such symbols.
3.Please let me know the solution ASAP.
What is the expected output? What do you see instead?
string with ™,£,å can be send to JSON web service method so i am able to process my
data.
but it will through the exception.
What version of the product are you using? On what operating system?
latest version. 0.9xxxxx
Please provide any additional information below.
Reported by ganeshlunawat
on 2011-10-13 08:44:32
Originally reported on Google Code with ID 11
What steps will reproduce the problem?
1. Create a class which uses a Nullable<T> type
2. Create an instance of that class and give the nullable property a value
3. Serialize the object as JSON
4. Attempt to de-serialize the object
What is the expected output? What do you see instead?
The JSON text is converted to the object type. Instead I get the following
error:
Jayrock.Json.JsonException : Don't know how to import
System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]] from JSON.
What version of the product are you using? On what operating system?
0.9.8316 on Windows Vista.
Reported by scratched86
on 2009-04-16 18:44:22
Originally reported on Google Code with ID 44
What steps will reproduce the problem?
1.Copy and paste the following code.
2.Invoke getDT method and copy the result string.
3.Invoke setDT method using the result string in step 2.
public class DateTimeService : JsonRpcHandler
{
/**
* Example Output: "2011-09-05T23:30:00.0087726-0+:00"
* The output string is passed to setDT method.
*/
[JsonRpcMethod("getDT")]
public DateTime GetDateTime()
{
return DateTime.Now;
}
/**
* Test this method will fail if
* the input string has the trailing "-0+:00".
*/
[JsonRpcMethod("setDT")]
public DateTime SetDateTime(DateTime dt)
{
return dt;
}
}
What is the expected output? What do you see instead?
An window with error message appears when setDT method is invoked.
What version of the product are you using? On what operating system?
Version v0.9.12915. Window 7 64-bit.
Please provide any additional information below.
N/A
Reported by jinqiang.chen
on 2011-09-06 04:56:52
Originally reported on Google Code with ID 27
Reverend Chip:
> public ComponentImporter(Type type,
> ICustomTypeDescriptor typeDescriptor) : base(type)
> {
> ...
> for (int i = 0; i < properties.Count; i++)
> {
> ...
> importers[i++] = importer;
> count++;
> }
> ...
> }
>
>
> The above function can increment i twice in the same loop iteration
> This appears to me to be a bug.
Source: http://groups.google.com/group/jayrock/t/c3cac631eb92a8eb
Reported by azizatif
on 2011-03-22 21:59:08
mono tools/NAnt/NAnt.exe
Expected the build to succeed. Instead it fails due to the following failing test:
[nunit2] Tests run: 927, Failures: 1, Not run: 0, Time: 2.479 seconds
[nunit2]
[nunit2] Failures:
[nunit2] 1) Jayrock.Services.TestMethod.Issue12 : System.Security.SecurityException
was expected
[nunit2]
[nunit2]
[nunit2]
See attached build log for full details.
Originally reported on Google Code with ID 23
Reported by @atifaziz on 2010-11-19 22:56:17
Originally reported on Google Code with ID 13
What new or enhanced feature are you proposing?
Structs should be able to be imported and exported from/to JSON. The code would be
nearly
identical as the Component Importer/Exporter classes, the primary difference is to
use fields
instead of properties.
What goal would this enhancement help you achieve?
The same _can_ be accomplished using classes, but frankly that seems like a bad coding
style to
use a class when you are simply passing data back and forth.
Reported by danielhazelbaker
on 2009-05-16 03:05:03
This is a superficial gap-filler issue designed to keep issue numbers in sync between when they were exported from Google Code Project Hosting service (where this project was previously hosted) and GitHub.
Originally reported on Google Code with ID 15
Update json.js to be in sync with the newer versions of this from json.org
The current json.js for Jayrock 0.9.8316 has some minor issues.
1. A bug where a complex javascript object passed to a jayrock function would have
parts silently pruned off and thus fail as it was unable to be turned into a valid
object back
at the server.
At this point in the
JayrockChannel.rpc
This line below would drop parts out.
xhr.send(JSON.stringify(call.request))
I was able to work around it by using the json.js from json.org and renaming the methods
to match what Jayrock wanted.
2. I think you get a bunch of new features in the new version. Eg Detection of browser
implemented json.
Reported by AlexanderJeffery
on 2009-09-24 05:11:31
Originally reported on Google Code with ID 50
What new or enhanced feature are you proposing?
[HG rev63] Suggest adding "yyyy-MM-dd'T'HH:mm:ss" as one of the supported formats for
DateTimeImporter. I think we could leave the time-zone handling to user of the library
- by checking the DateTime.Kind field.
What goal would this enhancement help you achieve?
Allow me to handle Bugzilla::WebService API that returns unspecified time-zone in date-time
string result. E.g. '2010-01-02T12:34:56'
Reported by frankiefonghk
on 2012-10-12 08:11:03
Originally reported on Google Code with ID 14
What steps will reproduce the problem?
1. Create a class with a single property called "UserName".
2. Create an RPC method that accepts this new class as its only parameter and returns
the class
itself without change.
3. Use the test interface to call the method with something in the username field.
What is the expected output? What do you see instead?
I expect to see the same capitalization of the parameter that I use in the source code.
What version of the product are you using? On what operating system?
0.9.8316 - Mac OS X 10.5.7 Intel.
Please provide any additional information below.
It seems like, for whatever reason, the first letter is being forced to lower case.
I don't know why
as in my own test case if I check the field name manually it has the correct capitalization.
Reported by danielhazelbaker
on 2009-05-16 03:30:45
Originally reported on Google Code with ID 49
What new or enhanced feature are you proposing?
Remove Encoding parameter to StreamWriter() instantiation on Invoke().
What goal would this enhancement help you achieve?
Prevent the 3-byte BOM mark from sending as part of the POST data. This could cause
some trouble for server side - unable to parse the JSON data.
Reported by frankiefonghk
on 2012-10-10 03:54:18
Originally reported on Google Code with ID 3
What steps will reproduce the problem?
IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReferenceToFileAndPath(r'C:\Jayrock\bin\Debug\Jayrock.Json.dll')
>>> from Jayrock.Json.Conversion import JsonConvert
>>> a = JsonConvert.Import('[ 0.3386980, 51.0376480, 0 ]')
>>> [type(e) for e in a]
What is the expected output? What do you see instead?
Expected to see:
[<type 'JsonNumber'>, <type 'JsonNumber'>, <type 'JsonNumber'>]
Instead, the result was:
[<type 'str'>, <type 'JsonNumber'>, <type 'JsonNumber'>]
The first number, 0.3386980, in the array is seen as a String rather than a
JsonNumber object like the rest of numbers in the array.
Additional information:
Tested with Jayrock version 0.9.10610.1056.
Reported by azizatif
on 2009-01-07 20:20:12
Originally reported on Google Code with ID 19
What new or enhanced feature are you proposing?
* Allow a JsonRpcHandler to be called without parsing a particular parameter (eg, leave
it as raw JSON).
eg, a JsonRpcHandler method with the signature "public void SaveData(int id, Json data)"
could be called, and the raw JSON data would be available in the data parameter. This
would allow that data to be persisted as JSON / used as payload for another webservice,
etc.
* Allow a JsonRpcHandler to return data that is already in JSON format.
eg, a JsonRpcHandler method with the signature "public Json GetData(int id)" could
return JSON data as-is to the client, without Jayrock parsing the data. This would
allow JSON that was either persisted, or generated from some other source to be returned
from a JsonRpcHandler method.
What goal would this enhancement help you achieve?
It would allow a JsonRpcHandler method to take / return JSON data generated from a
source other than Jayrock. For instance, JSON data may have been persisted in a DB;
there is currently no way for the JsonRpcHandler to return that data, except to use
JsonConvert.Import(jsonString), and then return the object from the handler method.
Reported by andrew.sampson
on 2010-10-04 08:06:05
Originally reported on Google Code with ID 7
What is the expected output? What do you see instead?
When I'm trying to use JsonWriter to write a String contains "\", it will
always output "\\".
For example, I'm trying to write "\u7E7F", instead I got "\\u7E7F".
What version of the product are you using? On what operating system?
I'm using 0.9.8316 version.
Please provide any additional information below.
I read the source code and found it is the JsonString.Enquote Method
causing the problem. I know what this method is intended for. But it makes
user cannot write "\" character anymore.
Reported by jackyang0125
on 2009-02-07 20:03:44
Originally reported on Google Code with ID 36
What new or enhanced feature are you proposing?
Add a ContentType property to the JsonRpcClient which it will use when creating WebRequest
instances.
What goal would this enhancement help you achieve?
The JsonRpcClient uses the default content type for POST. Some servers expect the
content type "application/json-rpc". This enhancement will allow the JsonRpcClient
to be used with a wider range of JsonRpc servers by allowing for any content type to
be used.
Reported by rgraves
on 2011-06-29 19:30:56
Originally reported on Google Code with ID 16
Specified argument was out of the range of valid values.
Parameter name: utcDate
System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) +2816706
System.Web.HttpCachePolicy.SetLastModified(DateTime date) +47
Jayrock.JsonRpc.Web.JsonRpcProxyGeneratorBase.ProcessRequest() +150
Jayrock.JsonRpc.Web.JsonRpcServiceFeature.ProcessRequest(HttpContext
context) +17
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest() +52
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest(HttpContext context) +51
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +75
What steps will reproduce the problem?
1. Build on machine with UTC +10
2. Deploy to machine UTC -7 (2003 R2, x64, SP2)
3. Browse to ?proxy
What is the expected output? What do you see instead?
Seeing an exception page.
What version of the product are you using? On what operating system?
0.9.8316,
Please provide any additional information below.
If i set my clock back on the development machine and build then it works
fine, if i wait for a day or so then it works fine. Neither of these
solutions are ideal.
I have found references to this being fixed in older version. But it
doesn't seem to be working for me.
Many thanks
Glen
Reported by glenfoley83
on 2010-03-01 23:05:22
Originally reported on Google Code with ID 48
What steps will reproduce the problem?
1. Unpack the jayrock-0.9.12915-all
2. Open Samples solution from VS2010 C# Express
3. Run JsonRpcClientDemo
What is the expected output? What do you see instead?
Exception at the line calling 'sum' remote function. Change it to 'add' in order to
work.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Reported by frankiefonghk
on 2012-10-09 03:06:26
Originally reported on Google Code with ID 41
Hi guys,
Please release a new build.
The patch for not throwing an exception when an error is returned is critial for me,
but I can't download the source because you use hg, and your latest release is from
Feb when the patch is more recent than that.
Thanks
Reported by phplasma
on 2011-08-08 09:34:47
Originally reported on Google Code with ID 17
What steps will reproduce the problem?
IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3603
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference('Jayrock.Json')
>>> from Jayrock.Json import *
>>> r = JsonText.CreateReader('1.79769313486232e+308')
>>> r.ReadNumber()
What is the expected output? What do you see instead?
Expected to get back a JsonNumber initialized with the value
1.79769313486232e+308 but instead got the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: The text '1.79769313486232e+308' has the incorrect syntax for a
number. See line 1, position 21.
Additional information.
Assembly version: 0.9.11214.0
File version: 0.9.11104.0706
Revision: r820
Runtime: .NET Framework 2.0
OS: Windows XP Professional SP 3
This issue was originally brought up at the discussion group in the
following message:
http://groups.google.com/group/jayrock/msg/977198b5e698aeca
Reported by azizatif
on 2010-03-10 17:24:12
Originally reported on Google Code with ID 39
Implements fixes for issues 36, 37, and 38.
Reported by rgraves
on 2011-06-30 09:36:35
Originally reported on Google Code with ID 25
- What new or enhanced feature are you proposing?
Ext.Direct requires a server-side stack that fits pretty well with what Jayrock already
provides. It has a lot of support within the Ext framework for populating stores, and
generally calling services.
See the spec here: http://www.sencha.com/products/js/direct.php
- What goal would this enhancement help you achieve?
Better integration, and simplified client-side code when using Jayrock enabled services.
Reported by westy.at.work
on 2010-12-09 09:45:48
This is a superficial gap-filler issue designed to keep issue numbers in sync between when they were exported from Google Code Project Hosting service (where this project was previously hosted) and GitHub.
Originally reported on Google Code with ID 46
Unity Web Player is mostly Mono, but lacks some things that Mono usually has. Most
problematically, it lacks System.Configuration. This commit adds patches to support
this target:
http://code.google.com/r/revchip-jayrock2/source/detail?r=5fda98ab6a492abe0ec12277167da48c89aac2a4
I would like to also specifically exclude the System.Xml reference, but I don't know
Nant well enough to do that. (yet)
Reported by rev.chip
on 2011-10-27 01:59:53
Originally reported on Google Code with ID 34
Unfortunately, the CAS model changed enough in .NET 4 to break JayRock when running
it in Medium trust. The full stack trace is below.
The System.Runtime.Serialization.IObjectReference interface is marked as SecurityCritical,
so even attempting to implement it violates medium trust.
Full stack trace below.
Inheritance security rules violated while overriding member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security accessibility
of the method being overriden.
Description: An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and where
it originated in the code.
Exception Details: System.TypeLoadException: Inheritance security rules violated while
overriding member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security accessibility
of the method being overriden.
Source Error:
An unhandled exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified using
the exception stack trace below.
Stack Trace:
[TypeLoadException: Inheritance security rules violated while overriding member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security accessibility
of the method being overriden.]
Jayrock.Json.Conversion.ExportContext.Export(Object value, JsonWriter writer) +0
Jayrock.Json.Conversion.JsonConvert.Export(Object value, JsonWriter writer) +31
Jayrock.Json.Conversion.JsonConvert.Export(Object value, TextWriter writer) +27
Jayrock.JsonRpc.Web.JsonRpcProxyGenerator.Version1(ServiceClass service, Uri url,
IndentedTextWriter writer) +261
Jayrock.JsonRpc.Web.JsonRpcProxyGenerator.WriteProxy(IndentedTextWriter writer)
+502
Jayrock.JsonRpc.Web.JsonRpcProxyGeneratorBase.ProcessRequest() +505
Jayrock.JsonRpc.Web.JsonRpcServiceFeature.ProcessRequest(HttpContext context) +20
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest() +55
Subtext.Web.Admin.Services.Ajax.AjaxServices.ProcessRequest() +111
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest(HttpContext context) +40
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+75
Reported by haacked
on 2011-05-19 05:42:39
Originally reported on Google Code with ID 37
What steps will reproduce the problem?
Invoke a JSON RPC which responds with an error in the format:
{
result: null,
error: { message: 'Some message here', code: 123 },
id: 1
}
What is the expected output? What do you see instead?
Expected an exception to be thrown.
Instead a null is returned.
Please provide any additional information below.
Because the result: null is the first item in the collection, it will be evaluated
and returned before the error is evaluated. Fix attached.
Reported by rgraves
on 2011-06-30 09:17:43
Originally reported on Google Code with ID 35
What steps will reproduce the problem?
1. create JsonTextWriter in using block
2. encode a large json object
What is the expected output? What do you see instead?
content not flushed / malformed JSON
What version of the product are you using? On what operating system?
I checked the latest code checked in and I don't see a call to flush.
Reported by DanielLPerry
on 2011-06-10 13:26:40
Originally reported on Google Code with ID 32
I'm fairly sure that you don't want the Number styles here, which allow for trailing
sign and thousands separators:
http://code.google.com/r/revchip-jayrock/source/detail?r=e52b31f91c1acad1e8934b972a737bd6318714bc
http://code.google.com/r/revchip-jayrock/source/detail?r=f46f430e057037b63fd53f7518eae40d17424df9
Reported by rev.chip
on 2011-04-19 01:34:11
Originally reported on Google Code with ID 21
What steps will reproduce the problem?
1. Check out Jayrock from the repository (r877 at time of reporting) on a machine with
.NET Framework 1.x installed
2. Run build.cmd in the root of the project
What is the expected output? What do you see instead?
Expect all compilation to succeed for all available platforms. Instead, build halts
with following compilation errors while target .NET Framework 1.1:
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(38,90): error CS1026:
) expected
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(38,91): error CS1525:
Invalid expression term ')'
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(38,92): error CS1003:
Syntax error, ':' expected
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(38,94): error CS1026:
) expected
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(44,17): error CS0246:
The type or namespace name 'NullableImporter' could not be found (are you missing a
using directive or an assembly reference?)
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(89,74): error CS1026:
) expected
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(89,75): error CS1525:
Invalid expression term ')'
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(89,76): error CS1003:
Syntax error, ':' expected
tests\Jayrock\Json\Conversion\Converters\TestNullableImporter.cs(89,77): error CS1026:
) expected
tests\Jayrock\TestUtilityBase.cs(50,39): error CS1525: Invalid expression term '?'
tests\Jayrock\TestUtilityBase.cs(50,74): error CS1003: Syntax error, ':' expected
tests\Jayrock\TestUtilityBase.cs(50,76): error CS1002: ; expected
See the attached build log for full details.
Reported by azizatif
on 2010-10-14 20:21:30
Originally reported on Google Code with ID 24
What steps will reproduce the problem?
1. Check out the latest reversion (r883 at reporting time) from the repository
2. Build on the command line using `mono tools/NAnt/NAnt.exe`
What is the expected output? What do you see instead?
Expected the build to succeed. Instead it fails due to the following failing test:
[nunit2] Tests run: 927, Failures: 2, Not run: 0, Time: 2.382 seconds
[nunit2]
[nunit2] Failures:
[nunit2] 1) Jayrock.Json.Conversion.Converters.TestArrayImporter.ImportDateArray
: Jayrock.Json.JsonException : Error importing JSON String as System.DateTime.
...
See attached build log for full details.
Reported by azizatif
on 2010-11-19 22:59:33
Originally reported on Google Code with ID 20
What steps will reproduce the problem?
1. Check out Jayrock from the repository (r877 at time of reporting)
2. Run build.cmd in the root of the project
What is the expected output? What do you see instead?
Expected targets to build according to the installed .NET Framework version and SDKs.
Instead, all platform targets appear to be skipped. See attached build log for details.
Reported by azizatif
on 2010-10-14 19:14:46
Originally reported on Google Code with ID 28
The attached patch includes a complete implementation of member naming convention support
for underscores as separators and prefixes, e.g. "FooBar" -> "foo_bar", or "blargh"
-> "_blargh". It works in cooperation with the basic naming policies.
Reported by rev.chip
on 2011-03-23 02:53:31
Originally reported on Google Code with ID 8
What steps will reproduce the problem?
Run the following IronPython script (also attached as test.py):
import clr
clr.AddReference('Jayrock')
from Jayrock.JsonRpc import JsonRpcService
print 'Methods =', JsonRpcService().GetClass().GetMethods().Length
What is the expected output? What do you see instead?
Expected output is:
Methods = 3
Actual output is:
Methods = 0
Additional information:
Using latest version in trunk, which is r758 at the time of reporting this
issue.
Reported by azizatif
on 2009-03-06 17:41:13
Originally reported on Google Code with ID 33
Just by reading the code, I think this change is needed for parsing negative dates.
And yet the tests are passing? Perhaps I misunderstand how the long.Parse() function
works.
http://code.google.com/r/revchip-jayrock/source/detail?r=f24d8a7ccdbd99c391f58850ba0ae4f8d17f70c3
Reported by rev.chip
on 2011-04-19 01:35:25
Originally reported on Google Code with ID 47
When trying to deserialize list, an exception is thrown.
bool isGenericList = Reflector.IsConstructionOfGenericTypeDefinition(type, typeof(IList<>));
returns false for List<> but can be fixed with
bool isGenericList = Reflector.IsConstructionOfGenericTypeDefinition(type, typeof(IList<>))
|| Reflector.IsConstructionOfGenericTypeDefinition(type, typeof(List<>));
Reported by jhested
on 2011-12-07 01:37:13
This is a superficial gap-filler issue designed to keep issue numbers in sync between when they were exported from Google Code Project Hosting service (where this project was previously hosted) and GitHub.
Originally reported on Google Code with ID 4
Issue Targeted:
- ASYNC request is called but user / code needs to abort
- current implementation doesn't allow access to a started request
Solution Suggested:
The autogenerated JS code from the proxy is to be extended by the following:
1. object to store the running http requests (ASYNC) (object name:
httprequests)
2. function to abort a running (or not) async web service request (method
name: <jsonServiceObject>.abortConnection(<JsonServiceObject-requestid>))
3. for debugging or other: retrieval of the http-Request object (method
name: <jsonServiceObjec>.getRequestObj(<JsonServiceObject-requestid>))
What version of the product are you using? On what operating system?
latest JayRock
on Vista
tested it for browsers: IE7, FF3, Safari (latest), Opera (latest), Chrome
Please provide any additional information below.
Patching:
please replace the file: JsonRpcProxyGenerator.cs in Project JsonRPC,
folder Web by the attached (modifications are marked with "// SC ADDITION
22-Jan-2009" and "// END SC ADDITION 22-Jan-2009".
-recompile and use the new DLLs
Usage sample:
Code in the ASPX page:
...
var myrequestid = 0;
var jsonService = new LogonServiceJRv1();
window.onload = function()
{
var myresult = new Object();
myrequestid = jsonService.SampleMethod1Logon("ASYNC webservice
CALL", function(response) {
eval("myresult = " + response.result + ";");
var outputmessage = "";
// output loop
for (variable in myresult) {
outputmessage += variable + ": " + myresult[variable] + "\n";
}
alert("ASYNC QUERY RESULT:\n" + outputmessage);
});
}
function stopmenow() {
jsonService.abortConnection(myrequestid)
var myhttprequest = new Object();
myhttprequest = jsonService.getRequestObj(myrequestid);
var outputmessage = "";
// output loop
outputmessage = myhttprequest.readyState;
alert("Stopping confirmation:\n\"" + outputmessage + "\"");
}
... <body> ...
<a href="#" onclick="stopmenow(); return false;">abort</a>
I hope this helps others, too.
Let me know if you use it and it works for you or there are any suggestions.
Reported by olafheu
on 2009-01-22 12:15:45
Originally reported on Google Code with ID 12
What steps will reproduce the problem?
1. Add PrincipalPermissionAttribute for rpc function
2. rebuild
3. try using rpc
What is the expected output? What do you see instead?
It outputs error
"Unable to cast object of type
'System.Security.Permissions.PrincipalPermissionAttribute' to type
'System.ICloneable'."
What version of the product are you using? On what operating system?
Jayrock 0.9.8316 on Windows
Reported by uros.gruber
on 2009-05-06 19:25:26
Originally reported on Google Code with ID 42
What new or enhanced feature are you proposing?
The JsonRpcClient's StreamWriter is set to only output in UTF8. It
would be useful to give the programmer the ability to change encoding;
possibly by making use of the HttpWebClientProtocol.RequestEncoding property
What goal would this enhancement help you achieve?
The ability to choose the encoding used over the wire will raise compatibility when
communicating with other Json-RPC implementations and platforms.
Reported by Ionita.Adri
on 2011-08-30 18:05:26
Originally reported on Google Code with ID 22
What steps will reproduce the problem?
1. Check out latest revision (r884 at this time)
2. Run build.cmd in the distribution root
What is the expected output? What do you see instead?
Expect entire build script to succeed. Instead, build fails due the following failing
unit test:
Tests run: 887, Failures: 3, Not run: 0, Time: 4.657 seconds
Failures:
1) Jayrock.Json.Conversion.Converters.TestDateTimeExporter.Export :
String lengths are both 33.
Strings differ at index 29.
expected: <"1999-12-31T23:30:59.9990000-08:00">
but was: <"1999-12-31T23:30:59.9990000-0(:00">
-----------------------------------------^
2) Jayrock.Json.Conversion.Converters.TestDateTimeImporter.ImportMicrosoftAjaxFormat
:
expected: <9/26/2010 4:35:29 PM>
but was: <9/26/2010 7:35:29 AM>
3) Jayrock.Json.Conversion.Converters.TestDateTimeImporter.ImportMicrosoftAjaxFormatWithUpperCase
:
expected: <9/26/2010 4:35:29 PM>
but was: <9/26/2010 7:35:29 AM>
For the full build log, see attached build.txt.
Reported by azizatif
on 2010-10-26 19:12:33
Originally reported on Google Code with ID 10
r795
Throws in method Jayrock.TypeResolution.GetType when jayrock config section
not defined.
I think, in property Jayrock.JsonRpc.Web.JsonRpcHandler.DefaultFeatures
issue is
config.Add("rpc", typeof(JsonRpcExecutive).FullName);
...
and must be
config.Add("rpc", typeof(JsonRpcExecutive).AssemblyQualifiedName);
...
Sorry for my very bad English.
Reported by Stepan.Lameroff
on 2009-04-05 10:31:10
Originally reported on Google Code with ID 26
What steps will reproduce the problem?
1. Create JsonBuffer from array with objects
2. Create reader from the buffer and read as long as the token will be Object token
3. Call reader.BufferValue() this should break Debug.Assert statement in JsonBuffer.Slice:419
What is the expected output? What do you see instead?
JsonBuffer with correct indexes into the underlying array
What version of the product are you using? On what operating system?
Latest
Please provide any additional information below.
There is bug in Slice method. The method takes start and end indices and interprets
them as absolute to the underlying buffer. This behavior is not correct in BufferValue
method which expects the indices to be relative to reader's token index. The BufferValue
method breaks the assertion and returns unexpected portion of the token buffer.
Reported by adikuv
on 2011-03-17 10:40:11
Originally reported on Google Code with ID 31
The default converters default to dictionary handling only if the target object is declared
specifically as IDictionary<>. But what if you have a Dictionary<>? No. What if
you have something that implements IDictionary<>? No. This patch fixes those.
Reported by rev.chip
on 2011-04-13 08:35:38
Originally reported on Google Code with ID 38
What new or enhanced feature are you proposing?
Explicitly set the Content-Length before posting the request.
What goal would this enhancement help you achieve?
Some poorly implemented servers do not handle Expect: 100-continue http header properly.
The WebRequest automatically uses the Expect: 100-continue header when the application
does not explicitly set the Content-Length header before writing to the output stream.
This is not a bug in jayrock, but it is causing problems connecting to some servers.
Patch attached.
Reported by rgraves
on 2011-06-30 09:34:06
Originally reported on Google Code with ID 6
It would be very useful if there was the possibility to set an error code
in the response so that the client is able to react in the right way on a
specific error code.
This part of the response is defined in the JSON-RPC spec here:
http://json-rpc.org/wiki/specification, chapter 1.2.
Reported by thorsten.kraus
on 2009-01-30 11:11:18
PEVerify.exe
from .NET Framework 2.0 SDK on Jayrock.Json.dll
Expected all classes and method to pass verification. Instead, verification fails on InternetDate.Parse as shown below:
Microsoft (R) .NET Framework PE Verifier. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
[IL]: Error: [C:\Jayrock\bin\Debug\Jayrock.Json.dll :
Jayrock.InternetDate::Parse][offset 0x00000024] The 'this' parameter to the call must be the calling method's 'this' parameter.
[IL]: Error: [C:\Jayrock\bin\Debug\Jayrock.Json.dll :
Jayrock.InternetDate::Parse][offset 0x00000137] The 'this' parameter to the call must be the calling method's 'this' parameter.
2 Errors Verifying \Jayrock\bin\Debug\Jayrock.Json.dll
This issue was originally reported by Phil Haack (@haacked) in the following thread on the discussion group: VerificationException thrown on first request
Version of Jayrock.Json.dll
tested:
Originally reported on Google Code with ID 1
Reported by @atifaziz on 2008-11-10 10:00:48
Originally reported on Google Code with ID 2
Any chance you could look into providing an exception event so
developers can use their own error logging?
Something like this:
public abstract class BaseJsonService : JsonRpcHandler,
IRequiresSessionState
{
public override void ProcessRequest()
{
base.OnException += OnException;
base.ProcessRequest();
}
private void OnException(Exception ex){
// log exception
}
}
Reported by mr.simon.jones
on 2009-01-07 14:36:30
Originally reported on Google Code with ID 29
1. Dates before 1970 are negative, but valid; allow them.
2. In a regular expression, "\/" is a synonym for "/". Jayrock actually can't tell
the difference between "\/Date()\/" and "/Date()/". Given how Jayrock is structured
that's probably OK, but this patch adds a comment to that effect and removes the inoperative
backslashes from the regex. Fixing this issue would require parser changes to leave
markers in the Token when slashes are escaped.
3. As discussed in email, the dependency on System.Xml is mostly avoidable in Jayrock.Json,
with one exception: DateTime parsing. From my reading of the docs, DateTime.Parse()
should handle the cases required.
Reported by rev.chip
on 2011-03-23 03:36:12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.