jeveloper / jayrock Goto Github PK
View Code? Open in Web Editor NEWDe/Serializer for JSON for .NET (c#) compiles for .net 1.1 upwards
License: GNU General Public License v3.0
De/Serializer for JSON for .NET (c#) compiles for .net 1.1 upwards
License: GNU General Public License v3.0
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.
Original issue reported on code.google.com by rev.chip
on 23 Mar 2011 at 3:36
Attachments:
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
Original issue reported on code.google.com by [email protected]
on 6 Sep 2011 at 4:56
Attachments:
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.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2011 at 10:40
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=5fda98ab6a492abe0ec122
77167da48c89aac2a4
I would like to also specifically exclude the System.Xml reference, but I don't
know Nant well enough to do that. (yet)
Original issue reported on code.google.com by rev.chip
on 27 Oct 2011 at 1:59
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.ImportMicrosoftAjaxForma
t :
expected: <9/26/2010 4:35:29 PM>
but was: <9/26/2010 7:35:29 AM>
3)
Jayrock.Json.Conversion.Converters.TestDateTimeImporter.ImportMicrosoftAjaxForma
tWithUpperCase :
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.
Original issue reported on code.google.com by azizatif
on 26 Oct 2010 at 7:12
Attachments:
[deleted issue]
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.
Original issue reported on code.google.com by [email protected]
on 4 Oct 2010 at 8:06
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<>));
Original issue reported on code.google.com by [email protected]
on 7 Dec 2011 at 1:37
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.
Original issue reported on code.google.com by rev.chip
on 13 Apr 2011 at 8:35
Attachments:
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.
Original issue reported on code.google.com by azizatif
on 19 Nov 2010 at 10:59
Attachments:
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.
Original issue reported on code.google.com by [email protected]
on 10 Oct 2012 at 3:54
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'
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 8:11
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
Original issue reported on code.google.com by [email protected]
on 8 Aug 2011 at 9:34
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
}
}
Original issue reported on code.google.com by [email protected]
on 7 Jan 2009 at 2:36
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: 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.
Original issue reported on code.google.com by azizatif
on 19 Nov 2010 at 10:56
Attachments:
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.
Original issue reported on code.google.com by [email protected]
on 10 Jun 2011 at 1:26
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
Original issue reported on code.google.com by [email protected]
on 6 May 2009 at 7:25
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.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 6:44
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
Original issue reported on code.google.com by azizatif
on 24 Mar 2009 at 11:00
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
Original issue reported on code.google.com by azizatif
on 10 Mar 2010 at 5:24
Attachments:
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.
Original issue reported on code.google.com by [email protected]
on 5 Apr 2009 at 10:31
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.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2012 at 3:06
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.GetRealObje
ct(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.GetRealObje
ct(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.GetRealObje
ct(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
Original issue reported on code.google.com by [email protected]
on 19 May 2011 at 5:42
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.
Original issue reported on code.google.com by azizatif
on 7 Jan 2009 at 8:20
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.
Original issue reported on code.google.com by [email protected]
on 30 Jun 2011 at 9:34
Attachments:
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.
Original issue reported on code.google.com by azizatif
on 6 Mar 2009 at 5:41
Attachments:
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.Ex
ecute()
+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
Original issue reported on code.google.com by [email protected]
on 1 Mar 2010 at 11:05
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.
Original issue reported on code.google.com by [email protected]
on 16 May 2009 at 3:05
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.
Original issue reported on code.google.com by azizatif
on 14 Oct 2010 at 7:14
Attachments:
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.
Original issue reported on code.google.com by [email protected]
on 30 Aug 2011 at 6:05
- 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.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2010 at 9:45
What steps will reproduce the problem?
1. Run PEVerify.exe from .NET Framework 2.0 SDK on Jayrock.Json.dll
What is the expected output? What do you see instead?
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
Additional information:
This issue was originally reported by Phil Haack in the following thread
on the discussion group:
http://groups.google.com/group/jayrock/t/2369463aa15b23a
Version of Jayrock.Json.dll tested:
File Version: 0.9.10312.2155
Product Version: 0.9.8316.0
Original issue reported on code.google.com by azizatif
on 10 Nov 2008 at 10:00
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.
Original issue reported on code.google.com by rev.chip
on 23 Mar 2011 at 2:53
Attachments:
[deleted issue]
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.
Original issue reported on code.google.com by [email protected]
on 30 Jun 2011 at 9:17
Attachments:
Implements fixes for issues 36, 37, and 38.
Original issue reported on code.google.com by [email protected]
on 30 Jun 2011 at 9:36
Attachments:
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
Original issue reported on code.google.com by azizatif
on 22 Mar 2011 at 9:59
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.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2009 at 8:03
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.
Original issue reported on code.google.com by [email protected]
on 16 May 2009 at 3:30
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.
Original issue reported on code.google.com by [email protected]
on 22 Jan 2009 at 12:15
Attachments:
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=f24d8a7ccdbd99c391f5885
0ba0ae4f8d17f70c3
Original issue reported on code.google.com by rev.chip
on 19 Apr 2011 at 1:35
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.
Original issue reported on code.google.com by [email protected]
on 29 Jun 2011 at 7:30
Attachments:
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=e52b31f91c1acad1e8934b9
72a737bd6318714bc
http://code.google.com/r/revchip-jayrock/source/detail?r=f46f430e057037b63fd53f7
518eae40d17424df9
Original issue reported on code.google.com by rev.chip
on 19 Apr 2011 at 1:34
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
Original issue reported on code.google.com by nialldouglas14
on 20 Jul 2011 at 3:09
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.
Original issue reported on code.google.com by [email protected]
on 13 Oct 2011 at 8:44
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.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 5:11
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.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2009 at 11:11
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.
Original issue reported on code.google.com by azizatif
on 14 Oct 2010 at 8:21
Attachments:
[deleted issue]
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.
Original issue reported on code.google.com by azizatif
on 7 May 2010 at 6:07
Attachments:
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.