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

Fix error message in Go de-jsonization of strings #512

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aas_core_codegen/golang/jsonization/_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _generate_string_from_jsonable() -> Stripped:
{II}return
{I}}} else {{
{II}err = newDeserializationError(
{III}fmt.Sprintf("Expected a boolean, but got %T", jsonable),
{III}fmt.Sprintf("Expected a string, but got %T", jsonable),
{II})
{II}return
{I}}}
Expand Down Expand Up @@ -1416,7 +1416,7 @@ def _generate_to_jsonable(symbol_table: intermediate.SymbolTable) -> Stripped:

return Stripped(
f"""\
// Serialize ``that`` instance to a JSON-able representation.
// Serialize that instance to a JSON-able representation.
//
// Return a structure which can be readily converted to JSON,
// or an error if some value could not be converted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func stringFromJsonable(
return
} else {
err = newDeserializationError(
fmt.Sprintf("Expected a boolean, but got %T", jsonable),
fmt.Sprintf("Expected a string, but got %T", jsonable),
)
return
}
Expand Down Expand Up @@ -20859,7 +20859,7 @@ func dataSpecificationIEC61360ToMap(
return
}

// Serialize ``that`` instance to a JSON-able representation.
// Serialize that instance to a JSON-able representation.
//
// Return a structure which can be readily converted to JSON,
// or an error if some value could not be converted.
Expand Down
Loading