Comments (7)
Not sure I completely understand step 2. Any chance you'd be willing to provide a breaking
unit test (ideally as a patch on to TestJsonBuffer fixture) or a code snippet to reproduce
this accurately?
Reported by azizatif
on 2011-03-17 22:25:02
from jayrock.
Below is how I tried to reproduce this issue but it does not break (does not cause the
indicated debug assertion to fail):
// 1. Create JsonBuffer from array with objects
JsonBuffer buffer = JsonBuffer.From("[{},{},{}]");
// 2. Create reader from the buffer...
JsonBufferReader reader = buffer.CreateReader();
// ...and read as long as the token will be Object token
while (reader.TokenClass != JsonTokenClass.Object)
reader.Read();
// 3. Call reader.BufferValue() this should break
reader.BufferValue();
Note that I interpreted "...and read as long as the token will be Object token" as
"...and read until the token will be Object token" and thus the while loop. Object
tokens cannot appear adjacent, which is why I couldn't code up your original wording.
Reported by azizatif
on 2011-03-17 22:55:57
- Status changed: ``
from jayrock.
Reported by azizatif
on 2011-03-17 22:56:11
- Status changed:
New
from jayrock.
Yeah, i will try to make it more clear, probably providing the breaking unit test. I
can do that this evening.
Reported by adikuv
on 2011-03-18 11:25:23
from jayrock.
My description did not reproduced the problem. I used your code and modified it to reproduce
the issue. Here is the code:
// 1. Create JsonBuffer from array with objects
JsonBuffer buffer = JsonBuffer.From(@"[{},{""a"":{},""b"":{}}]");
// 2. Create reader from the buffer...
JsonBufferReader reader = buffer.CreateReader();
// ...read in the first object
while (reader.TokenClass != JsonTokenClass.Object)
reader.Read();
reader.Read(); // Read Object token
reader.Read(); // Read EndObject token
// ...create a subbuffer to buffer the next object
JsonBuffer subBuffer = JsonBuffer.From(reader);
// ...create reader from the subbuffer
JsonBufferReader reader2 = subBuffer.CreateReader();
// 3. Call reader.BufferValue() this should break
reader2.BufferValue();
Reported by adikuv
on 2011-03-18 23:25:22
from jayrock.
Reported by azizatif
on 2011-03-21 15:59:07
- Status changed:
Accepted
- Labels added: Component-JSON, Milestone-Release1.0
from jayrock.
Fixed in r889.
Reported by azizatif
on 2011-03-21 22:45:06
- Status changed:
Fixed
from jayrock.
Related Issues (20)
- Have JsonRpcClient use .NET 4.0 ExpandoObject to dynamically generate API
- Please release a new build HOT 2
- Ability to choose output encoding HOT 5
- Gap-filler (ignore)
- DateTime String Convertion Error HOT 3
- Jayrock ™£å symbol problem HOT 2
- [PATCH] Build target specifically for Unity Web Player
- Cannot deserialize List<> HOT 2
- JsonRpcClientDemo calls non-existing remote method `sum` HOT 2
- UTF8 BOM marker in request sent by JsonRpcClient HOT 3
- DateTimeExporter to allow unspecified time-zone HOT 1
- Getting HTTP Status and Server Content-Type from JsonRpcClient HOT 1
- Patch to usaging Jayrock.JSON with Unity3D runtime
- JsonConvert.ExportToString returns type name HOT 1
- Allow parsing date formats with the Z timezone specifier HOT 9
- Storing to a static field results in error
- Make Jayrock meet the error requirements of JSON-RPC 2.0 HOT 6
- Importing large nested arrays causes max depth exceeded error HOT 1
- AWS Elastic Load Balancer listener
- JsonRPC Update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jayrock.