API Reference > imodeljs-common > Codes > Code Code Class A three-part structure containing information about the Code of an Element Implements CodeProps Methods Name Description constructor(codeProps: CodeProps): Code equals(other: Code): boolean getValue(): string Deprecated toJSON(): CodeProps createEmpty(): Code Static Create an empty, non-unique code with no special meaning. fromJSON(json?: any): Code Static isEmpty(c: CodeProps): boolean Static Determine if this code is valid but not otherwise meaningful (and therefore not necessarily unique) isValid(c: CodeProps): boolean Static Determine whether this Code is valid. Properties Name Type Description scope string The CodeScope of the Element spec string The id of the CodeSpec of the Element value Accessor string The CodeValue of the Element Defined in core/common/src/Code.ts Line 29 Last Updated: 11 June, 2024