Using Json Schema with wordpress codex

I have a json schema code that I need to use it for all posts

script type=application/ld+json
{
  @context: https://schema.org,
  @type: Article,
  mainEntityOfPage: {
    @type: WebPage,
    @id: https://akhbarejadid.com/457881/
  },
  headline: title,
  description: this is a test description,
  image: https://media.imna.ir/d/2021/07/15/4/1713968.jpg,  
  author: {
    @type: Person,
    name: Javad
  },  
  publisher: {
    @type: Organization,
    name: Akhbarejadid,
    logo: {
      @type: ImageObject,
      url: https://akhbarejadid.com/wp-content/uploads/2021/05/logoakhbarejadid.png
    }
  },
  datePublished: 2022-03-01,
  dateModified: 2022-03-16
}
/script

Can I use wp codes like the_title(); or the_author(); or the_content(); for this json schema? For example :

headline: ?php the_title(); ?,
  description: ?php the_excerpt(); ?,
  image: https://media.imna.ir/d/2021/07/15/4/1713968.jpg,  
  author: {
    @type: Person,
    name: ?php the_author(); ?

Topic codex Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.