To solve the given optimization problem, we first need to translate the natural language description into a symbolic representation. This involves defining variables, an objective function, and constraints based on the information provided.

Let's denote:
- \(x_1\) as the number of containers of nuts.
- \(x_2\) as the number of containers of candy.

The objective is to maximize profit. Given that the profit per container of nuts is $5 and the profit per container of candy is $3, the objective function can be represented algebraically as:
\[ \text{Maximize:} \quad 5x_1 + 3x_2 \]

The constraints are based on the available time for weighing and packaging. For weighing, each container of nuts takes 10 minutes, and each container of candy takes 5 minutes, with a total of 1000 minutes available. This can be represented as:
\[ 10x_1 + 5x_2 \leq 1000 \]

For packaging, each container of nuts takes 5 minutes, and each container of candy takes 8 minutes, with a total of 1500 minutes available. This constraint is:
\[ 5x_1 + 8x_2 \leq 1500 \]

Additionally, we have non-negativity constraints since the number of containers cannot be negative:
\[ x_1 \geq 0, \quad x_2 \geq 0 \]

Now, let's represent this problem in the requested JSON format for symbolic representation:

```json
{
    'sym_variables': [('x1', 'number of containers of nuts'), ('x2', 'number of containers of candy')],
    'objective_function': '5*x1 + 3*x2',
    'constraints': ['10*x1 + 5*x2 <= 1000', '5*x1 + 8*x2 <= 1500', 'x1 >= 0', 'x2 >= 0']
}
```

Next, we'll write the Gurobi code in Python to solve this optimization problem:

```python
from gurobipy import *

# Create a new model
m = Model("Grocery_Optimization")

# Define variables
x1 = m.addVar(name="nuts", vtype=GRB.CONTINUOUS, lb=0)
x2 = m.addVar(name="candy", vtype=GRB.CONTINUOUS, lb=0)

# Set the objective function
m.setObjective(5*x1 + 3*x2, GRB.MAXIMIZE)

# Add constraints
m.addConstr(10*x1 + 5*x2 <= 1000, name="weighing_time")
m.addConstr(5*x1 + 8*x2 <= 1500, name="packaging_time")

# Optimize the model
m.optimize()

# Print the solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of containers of nuts: {x1.x}")
    print(f"Number of containers of candy: {x2.x}")
    print(f"Maximum profit: ${5*x1.x + 3*x2.x:.2f}")
else:
    print("No optimal solution found")
```