Comments (10)
This can not be changed: number of elements is not known when writeStartObject() is called; it is also known once elements have been output. So you will need to figure out another way to achieve the same result.
from jackson-core.
Unfortunately I was thinking that might be the reason. Thanks for the (quick) answer.
from jackson-core.
No problem -- unfortunately it is a hard limitation. I hope you can figure out alternative way to do this.
from jackson-core.
i've been writing my own prettyprinter and i encountered similar issue.
actually, there seem to be a problem with the writeEndObject().
it is calling :
...
_writeContext = _writeContext.getParent();
if (_cfgPrettyPrinter != null) {
_cfgPrettyPrinter.writeEndObject(this, _writeContext.getEntryCount());
therefore, the supplied entry count is incorrect.
i suspect we should restore the write context once the writing is done (see #writeEndArray ())
i've checked at the trunk and code is still exhibiting the same behavior.
is it possible to re-open the issue to perform the fix ?
PS: i'm using json resources in test cases and was encountering false errors because of this behavior when comparing results with resources contents.
from jackson-core.
Ok, it does look like entry count should be taken from the open context. Will reopen.
from jackson-core.
tatu,
btw: i'm using maven to perform builds. do you publish patches on the maven
repositories?
thank you / kiitos
On Mon, Jun 11, 2012 at 7:56 PM, Tatu Saloranta <
[email protected]
wrote:
Ok, it does look like entry count should be taken from the open context.
Will reopen.
Reply to this email directly or view it on GitHub:
#6 (comment)
from jackson-core.
Hi there! (and "ole hyva!")
I occasionally publish snapshots to Sonatype Maven OSS repository, whenever someone requests them.
But there is no automated nightly build system.
from jackson-core.
Fixed for 1.9.8, 2.0.3 and 2.1; was as simple as moving context change after output.
from jackson-core.
thank you, tatu.
have a good day.
ps: how do you decide when you do release the code ? time-based (ie: twice
a quarter) ? depending on volume of changes ? depending on a feature
completion ?
On Tue, Jun 12, 2012 at 8:12 AM, Tatu Saloranta <
[email protected]
wrote:
Fixed for 1.9.8, 2.0.3 and 2.1; was as simple as moving context change
after output.
Reply to this email directly or view it on GitHub:
#6 (comment)
from jackson-core.
No strict criteria for patch releases, i.e. "when I feel like it" or "when enough users ask for a release". Will try to consider both time and number of bugs; no point releasing a version with just one fix usually; so with 3-4 fixes, and at least 1 month between seems a typical interval.
For major/minor releases I try to figure out a rough scope for release, usually 1-2 months after I actually start implementing new features. This is just so that I resist the urge to keep on piling things up; it is good to have 2 or 3 minor releases per year, as work involved for these is bigger than for patches.
from jackson-core.
Related Issues (20)
- Enable Fast Floating-Point reading/writing by default in 3.0
- Lower default `maxNestingDepth` of `StreamReadConstraints` / `StreamWriteConstraints` to 500 in 3.0
- Migrate remaining test to JUnit 5 HOT 3
- document JsonRecyclerPools.sharedBoundedPool() HOT 1
- NoSuchMethodError: com.fasterxml.jackson.core.util.BufferRecycler.releaseToPool() HOT 3
- Revert #1117: change default recycler pool back to `threadLocalPool()` for 2.17.1 HOT 1
- Figure out why `LockFreePool` appears to cause unintended object retention (~= memory leak) HOT 13
- Add diagnostic method `pooledCount()` in `RecyclerPool` HOT 1
- Rename shaded `ch.randelshofer:fastdoubleparser` classes to prevent use by downstream consumers HOT 3
- Change default recycler pool to `newConcurrentDequePool()` in 2.18 HOT 1
- Change `JsonFactory.builder()` configuration of `RecyclerPool` to avoid allocation default implementation (in 3.0)
- Deprecate `LockFreePool` implementation in 2.18 (remove from 3.0) HOT 3
- Locale deserialization fails on locales with only a language and variant HOT 2
- `NUL`-corrupted keys, values on JSON serialization HOT 6
- Add back Java 22 optimisation in FastDoubleParser HOT 1
- Optimize `JsonParser.getDoubleValue()/getFloatValue()/getDecimalValue()` to avoid String allocation
- jackson-core-2.16.0.jar incorrectly flagged with CVE-2023-5072 (org.json library issue) HOT 3
- Add new method like `JsonParser.readText(Writer)` (and implementation) for truly non-buffering reads
- NegativeArraySizeException and ArrayIndexOutOfBoundsException in ByteQuadsCanonicalizer HOT 7
- How to change default RecyclerPool for 2.17.0 ? HOT 5
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 jackson-core.