'Entities are simple JSON objects that represent the core data structures in Lysand.',
}
# Entities
Entities are the foundation of the Lysand protocol. A similar concept to entities are the [ActivityStreams](https://www.w3.org/TR/activitystreams-core/) objects, which are used to represent activities in the [ActivityPub](https://www.w3.org/TR/activitypub/) protocol. {{ className: 'lead' }}
## Entity Definition
An entity is a simple JSON object that represents a core data structure in Lysand. Entities are used to represent various types of data, such as users, notes, and more. Each entity has a unique `id` property that is used to identify it within the instance.
Any field in an entity not marked as `required` may be omitted or set to `null`.
Each custom property must be namespaced with the organization's reversed domain name, followed by the property name. Extensions should be used sparingly and only when necessary.
When serialized to a string, the JSON representation of an entity should follow the following rules:
- Keys must be sorted lexicographically.
- Should use UTF-8 encoding.
- Must be **signed** using the relevant [User](/entities/users)'s private key, or the [Server Actor](/entities/server-actor)'s private key if the entity is not associated with a particular user.