[ https://issues.apache.org/jira/browse/JOHNZON-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christoph Nölle updated JOHNZON-208: ------------------------------------ Description: The following line works fine with yasson but fails with johnzon: generator.writeStartObject().writeKey("foo").write("bar).writeEndObject() It throws javax.json.stream.JsonGenerationException: write(param) is only valid in arrays The documentation of #write says: "Writes the specified value as a JSON number value within the current array, field or root context." Which to me sounds like it should work. was: The following line works fine with yassons but fails with johnzon: generator.writeStartObject().writeKey("foo").write("bar).writeEndObject() It throws javax.json.stream.JsonGenerationException: write(param) is only valid in arrays The documentation of #write says: "Writes the specified value as a JSON number value within the current array, field or root context." Which to me sounds like it should work. > allow org.apache.johnzon.core.JsonGeneratorImpl#write in object context > ----------------------------------------------------------------------- > > Key: JOHNZON-208 > URL: https://issues.apache.org/jira/browse/JOHNZON-208 > Project: Johnzon > Issue Type: Bug > Components: Core > Affects Versions: 1.1.11 > Reporter: Christoph Nölle > Priority: Major > > > The following line works fine with yasson but fails with johnzon: > generator.writeStartObject().writeKey("foo").write("bar).writeEndObject() > It throws > javax.json.stream.JsonGenerationException: write(param) is only valid in > arrays > The documentation of #write says: "Writes the specified value as a JSON > number value within the current array, field or root context." Which to me > sounds like it should work. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)