Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace references to "field" with "property" in JsonGenerator, JsonParser, method names; JsonToken values (JsonToken.FIELD_NAME -> JsonToken.PROPERTY_NAME) #670

Closed
cowtowncoder opened this issue Jan 25, 2021 · 0 comments
Labels
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Jan 25, 2021

One confusing aspect of naming in some parts of Jackson is reference to Object "fields": although there are a few alternatives (field, property, entry at least), we have mostly settled on "property" as the standard thing.
So with 3.0 let's try to unify JsonGenerator and JsonParser API (and supporting helpers types like context objects) to use "property" wherever "field" used to be used.

Changes include: (I'll try to add notes on all changes)

  • JsonToken: FIELD_NAME became PROPERTY_NAME (probably the biggest change externally)

  • JsonParser:

    • getCurrentName()->currentName()
    • nextFieldName()->nextName()
  • JsonGenerator:

    • writeFieldName() -> writeName()
    • All writeXxxField() became writeXxxProperty()
    • All writeXxxFieldStart() became writeXxxPropertyStart()
    • writeObject() changed to writePOJO() (since "object" here did NOT refer to JSON Object but to Java Object)
  • PrettyPrinter:

    • writeObjectFieldValueSeparator() -> writeObjectNameValueSeparator()
  • Separators: (used by PrettyPrinter)

    • getObjectFieldValueSeparator() -> getObjectNameValueSeparator()
    • withObjectFieldValueSeparator() -> withObjectNameValueSeparator()
cowtowncoder added a commit that referenced this issue Jan 25, 2021
cowtowncoder added a commit that referenced this issue Jan 25, 2021
cowtowncoder added a commit that referenced this issue Jan 26, 2021
@cowtowncoder cowtowncoder added this to the 3.0.0 milestone Jan 26, 2021
@cowtowncoder cowtowncoder changed the title Replace references to "field" in JsonGenerator method names with "property" Replace references to "field" in JsonGenerator, JsonParser method names with "property" Jan 26, 2021
@cowtowncoder cowtowncoder changed the title Replace references to "field" in JsonGenerator, JsonParser method names with "property" Replace references to "field" in JsonGenerator, JsonParser, JsonToken method names with "property" Feb 4, 2021
@cowtowncoder cowtowncoder changed the title Replace references to "field" in JsonGenerator, JsonParser, JsonToken method names with "property" Replace references to "field" with "property" in JsonGenerator, JsonParser, method names; JsonToken values (JsonToken.FIELD_NAME -> JsonToken.PROPERTY_NAME) Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant