# Yaegi interpreter unexpected behavior

**URL:** https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479
**Category:** Traefik v2
**Tags:** file, middleware, plugin
**Created:** [May 1, 2023, 2:20pm UTC](https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479 "2023-05-01T14:20:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![talevy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/talevy/32/6803_2.png) [@talevy](https://community.traefik.io/u/talevy)
#### Post date: [May 1, 2023, 2:20pm UTC](https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479/1 "2023-05-01T14:20:29Z")

</div>

Hi,  
I've written plugin for jwt validation,

I've used [github.com/golang-jwt/jwt/v4](http://github.com/golang-jwt/jwt/v4)

When I'm running Parse token, I get an empty map (only in yaegi test)  
go test works fine,

I tried to debug this and I've found out the issue in the line 162

 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/2/27324b2016769a6015ae70d93b5009d6136481ae.png)

the decode from object return empty string, example object:

![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/9/9ef978a196bcba7c63fcc63d1b9c9ad60b90f5ba.png)

I think it doesn't work with the `json:"email,omitempty"` annotation.

any idea how to manage it?

I think I'm using yaegi latest

thank you in advance

---

<div class="post-metadata">

### Author: ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)
#### Post date: [May 1, 2023, 2:52pm UTC](https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479/2 "2023-05-01T14:52:37Z")

</div>

Hello,

If you want to ask a question about yaegi, you have to open a discussion here [traefik/yaegi Q A · Discussions · GitHub](https://github.com/traefik/yaegi/discussions/categories/q-a)

---

<div class="post-metadata">

### Author: ![talevy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/talevy/32/6803_2.png) [@talevy](https://community.traefik.io/u/talevy)
#### Post date: [May 1, 2023, 3:27pm UTC](https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479/3 "2023-05-01T15:27:58Z")

</div>

Done, thanks 🙏

> **[Yaegi interpreter unexpected behavior · traefik/yaegi · Discussion #1548](https://github.com/traefik/yaegi/discussions/1548)**
>
> Hi, I've written plugin for jwt validation, I've used github.com/golang-jwt/jwt/v4 When I'm running Parse token, I get an empty map (only in yaegi test) go test works fine, I tried to debug this an...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)
#### Post date: [May 4, 2023, 3:28pm UTC](https://community.traefik.io/t/yaegi-interpreter-unexpected-behavior/18479/4 "2023-05-04T15:28:28Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
