Skip to content

[hsjs] Better handling of JSON property names #7276

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

witemple-msft
Copy link
Member

Closes #6879

  • Corrects requiresJsonSerialization to detect differences between logical and serialized property names in more cases.
  • Corrects JSON serialization to use quoted property names in object literals when serializing JSON objects.

@witemple-msft witemple-msft changed the title Witemple msft/quote property name json [hsjs] Better handling of JSON property names May 7, 2025
Copy link
Contributor

github-actions bot commented May 7, 2025

All changed packages have been documented.

  • @typespec/http-server-js
Show changes

@typespec/http-server-js - fix ✏️

Fixed an issue in which differences between model and JSON serialized property names were not correctly detected and property names for JSON serialization were not correctly quoted as necessary.

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: http-server-js: kebab case model properties not emitted as valid JS code in JSON serializer
2 participants